AggregationEnabled: TriState;
The AggregationEnabled property shows whether aggregation is used for the dimension element.
This is relevant if the dimension is located in the fixed area.
If the property is set to TriState.OnOption, multiple elements selection becomes available in the dimension when it is located in the fixed area. Data is aggregated based on the selected elements. Aggregation method is specified in the AggregatorOperation or UseDSAggregationValue property.
Executing the example requires a regular report with the Report identifier. A data source is added in the report. A data slice is created for this source. At least one dimension of this slice is located in the fixed area.
Sub Main;
Var
MB: IMetabase;
MObj: IMetabaseObject;
Report: IPrxReport;
DtSources: IPrxDataSources;
Slices: IPrxSlices;
SliceDim: IPrxSliceDimension;
Begin
MB := MetabaseClass.Active;
MObj := MB.ItemById("Report").Edit;
Report := MObj As IPrxReport;
DtSources := Report.DataSources;
Slices := DtSources.Item(0).Slices;
SliceDim := Slices.Item(0).FixedHeader.Item(0);
SliceDim.AggregationEnabled := TriState.OnOption;
SliceDim.AggregatorOperation := BasicAggregatorOperation.ArithmeticalMean;
SliceDim.Selection.SelectAll;
MObj.Save;
End Sub Main;
Executing the example sets up parameters of the first dimension located in the fixed area of the data slice. Data aggregation is enabled for the dimension. Arithmetic mean is used as the aggregation method. All elements are selected in the selection.
See also: