Description of components of data analysis
Less than 1 minute
Description of components of data analysis
To create the elementary form for operation with components of consolidated data analysis do the following steps:
- Place on the form and set up DataSet which will be the supplier of data for PivotDataSource.
- Place on the form PivotDataSource.
- Set PivotDataSource.DataSet property to be pointed on DataSet which is set up on step 1.
- Place on the form PivotGridEh and PivotGridToolBoxEh.
- Set PivotGridEh.PivotDataSource and PivotGridToolBoxEh.PivotDataSource properties to be pointed on PivotDataSource which is set up on step
Next steps are usually performed in Run-Time:
- Creation of structure of the internal buffer table in PivotDataSource based on DataSet fields or from scratch.
PivotDataSourceEh1.PivotFields.RebuildPivotFields;- Loading data from DataSet to PivotDataSource.
PivotDataSourceEh1.CreateAndFillSourceTable;- Setup sections and fields with consolidated data.
PivotDataSourceEh1.ColumnFields.Add('SaleDate.Year');
PivotDataSourceEh1.RowFields.Add('ShipVIA');
with PivotDataSourceEh1.ValueFieldDefs.Add do
begin
PivotFieldName := 'AmountPiad';
SumFunction := svtSumEh;
end;Usually settings of sections are stored in the configuration file or database.
- Formation of the consolidated report.
PivotDataSourceEh1.BuildPivotData;When you call BuildPivotData again, TPivotGridEh saves the column width, expanded / minimized groups, and filters.
Demo project of using components of the consolidated analysis of the data, see the library archive:<EhLib archive>\Demos\PivotGridEh.SimpleDemo\PivotGridEh.SimpleDemo.dpr
