AggregationEnabled: TriState;
AggregationEnabled: Prognoz.Platform.Interop.ForeSystem.TriState;
The AggregationEnabled property enables the user to set up data aggregation in the slice.
When the aggregation is set up, multiple dimension is available in fixed dimensions.
Executing the example requires a regular report with the Report identifier, also add links to the Metabase and Report system assemblies.
Sub Macro;
Var
MB: IMetabase;
MObj: IMetabaseObject;
Report: IPrxReport;
Slice: IPrxSlice;
Begin
MB := MetabaseClass.Active;
MObj := MB.ItemById("Report").Edit;
Report := MObj As IPrxReport;
Slice:= Report.DataSources.Item(0).Slices.Item(0);
If Not Slice.IsAggregationEnabled Then
Slice.AggregationEnabled:= TriState.OnOption;
End If;
MObj.Save;
End Sub Macro;
After executing the example aggregation is enabled for the first slice of the first data source, if it has not been enabled previously.
Executing the example requires a regular report with the Report identifier, also add links to the Report and ForeSystem system assemblies.
Imports Prognoz.Platform.Interop.Report;
Imports Prognoz.Platform.Interop.ForeSystem;
…
Public Shared Sub Macro(Params: StartParams);
Var
MB: IMetabase;
MObj: IMetabaseObject;
Report: IPrxReport;
Slice: IPrxSlice;
Begin
MB := Params.Metabase;
MObj := MB.ItemById["Report"].Edit();
Report := MObj As IPrxReport;
Slice:= Report.DataSources.Item[0].Slices.Item[0];
If Not Slice.IsAggregationEnabled Then
Slice.AggregationEnabled:= TriState.tsOnOption;
End If;
MObj.Save();
End Sub;
After executing the example aggregation is enabled for the first slice of the first data source, if it has not been enabled previously.
See also: