Calc/Implementation/Overview of DataPilot Development
1. What is DataPilot
DataPilot is a professional tool for data Analysis. It is very powerful at summary of data report, analysis of data and representation of data. DataPilot analyzes source data, and generates a clear Data report. We can provide different type of data source, such as a spreadsheet table, or a table in a database, and then the DataPilot can generate a clear data view for us.
2.Overview of DataPilot at source code level2.1. Source data abstract
To abstract different type of Data source, and to make DataPilot calculable after damange of source data, the source data is standardized and stored as a middle data structure of DataPilot source data cache. The DataPilot source data cache is a 2D table of data generated from the original source data. The data structure of DataPilot source data cache is named as ScDPTableDataCache.
2.2. Calculation Settings
To do data summarization, we need apply some calculation settings, such as which field is assigned to Data area/Row area/Column area/Page area, which function we want to summarize( Sum/Count/Average/Max/.... ). These settings determine how to do data summarization on the data to be analyzed. The structure to store the calculation settings is named ScDPSaveData. It has some members which store settings for the entire DataPilot table, such as whether to display column grand total/row grand total. And the ScDPSaveData has a member container which contains settings for each Field. The structure for Field settings is named as ScDPSaveDimension. The ScDPSaveDimension structure stored the settings for entire field, such as Field display name. And the ScDPSaveDimension structure also has a container which contains settings for each data item of this Field. The structure for data item settings is named as ScDPSaveMember.
2.2. Calculation Result
Since both the data to be analyzed and the calculation settings are ready, then the data is calculated and stored. The structure which takes the responsibility of calculation and result storage is named as ScDPSource.
2.3. Output Result
The class ScDPOuput takes the responsibility of outputting calculation result. It works with the result provider ScDPSource via access of the interface of XDataPilotResults. It checks the output settings such as whether to keep customized format, and generates output result base on calculation result and output settings.
2.4. Overview of the whole process