AggregatorOperation(Dimension: IDimInstanceIDimInstance): BasicAggregatorOperation;
AggregatorOperation(Dimension: Prognoz.Platform.Interop.Dimensions.IDimInstance): Prognoz.Platform.Interop.Matrix.BasicAggregatorOperation;
Dimension. Report data source dimension.
The AggregatorOperation property determines aggregation method with multiple selection by the selected dimension.
To determine whether to use data source aggregation value with multiple selection by the selected dimension, use the IPrxCalculatedBasePoint.UseDSAggregationValue property.
Executing the example requires that the repository contains a regular report with the DOCUMENT identifier that contains a text sheet. A data source of the regular report contains a dimension with the D_SEP identifier.
Add links to the Dimensions, Matrix, Metabase, Report system assemblies.
Sub UserProc;
Var
MB: IMetabase;
MObj: IMetabaseObject;
Report: IPrxReport;
DataSource: IPrxDataSource;
SliceDims: IPrxSliceDimensions;
Points: IPrxCalculatedPoints;
Point: IPrxCalculatedPoint;
Basepoint: IPrxCalculatedBasePoint;
Dim: IDimInstance;
Begin
MB := MetabaseClass.Active;
MObj := MB.ItemById("DOCUMENT").Edit;
Report := MObj As IPrxReport;
DataSource := Report.DataSources.Item(0);
SliceDims := DataSource.Slices.Item(0).Dimensions;
Dim := SliceDims.FindById("D_SEP").Dimension;
Points := DataSource.Points;
Points.Clear;
// Calculated point:
Point := Points.Add;
Point.Name := "Point_1";
Point.CalculateValue;
// Set up aggregation in calculated point:
Basepoint:= Point As IPrxCalculatedBasePoint;
If Basepoint.IsDSAggregationSupported(Dim) = True Then
Basepoint.DimAggregationEnabled(Dim):= True;
BasePoint.AggregatorOperation(Dim):= BasicAggregatorOperation.Sum;
Basepoint.UseDSAggregationValue(Dim):= True;
Point.SelectionSet.Item(0).SelectElement(0,False);
Point.SelectionSet.Item(1).SelectElement(0,False);
Point.CalculateValue(False);
Debug.WriteLine("Value in calculated point: " + Point.Value);
Points.CalculateValues;
End If;
(Report As IMetabaseObject).Save;
End Sub UserProc;
After executing the example aggregation in the calculated point is set up.
The requirements and result of the Fore.NET example execution match with those in the Fore example.
Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.Report;
Imports Prognoz.Platform.Interop.Dimensions;
Imports Prognoz.Platform.Interop.Matrix;
…
Public Shared Sub Main(Params: StartParams);
Var
MB: IMetabase;
MObj: IMetabaseObject;
Report: IPrxReport;
DataSource: IPrxDataSource;
SliceDims: IPrxSliceDimensions;
Points: IPrxCalculatedPoints;
Point: IPrxCalculatedPoint;
Basepoint: IPrxCalculatedBasePoint;
Dim: IDimInstance;
Begin
MB := Params.Metabase;
MObj := MB.ItemById["DOCUMENT"].Edit();
Report := MObj As IPrxReport;
DataSource := Report.DataSources.Item[0];
SliceDims := DataSource.Slices.Item[0].Dimensions;
Dim := SliceDims.FindById("D_SEP").Dimension;
Points := DataSource.Points;
Points.Clear();
// Calculated point:
Point := Points.Add();
Point.Name := "Point_1";
Point.CalculateValue(True);
// Set up aggregation in calculated point:
Basepoint:= Point As IPrxCalculatedBasePoint;
If Basepoint.IsDSAggregationSupported[Dim] = True Then
Basepoint.DimAggregationEnabled[Dim]:= True;
BasePoint.AggregatorOperation[Dim]:= BasicAggregatorOperation.baoSum;
Basepoint.UseDSAggregationValue[Dim]:= True;
Point.SelectionSet.Item[0].SelectElement(0,False);
Point.SelectionSet.Item[1].SelectElement(0,False);
Point.CalculateValue(False);
System.Diagnostics.Debug.WriteLine("Value in calculated point: " + Point.Value[True]);
Points.CalculateValues();
End If;
(Report As IMetabaseObject).Save();
End Sub;
See also: