CalculationMode: EaxDataAreaTransformationCalculationMode;
CalculationMode: Prognoz.Platform.Interop.Express.EaxDataAreaTransformationCalculationMode;
The CalculationMode property determines type of data transformation formula calculation.
By default, the property is set to EaxDataAreaTransformationCalculationMode.AfterCalcTotals.
Executing the example requires that the repository contains an express report with the EXPRESS identifier containing table. Add some Total totals to the dimension element.
Add links to the Express, Metabase system assemblies.
Sub UserProc;
Var
MB: IMetabase;
Express: IEaxAnalyzer;
Slice: IEaxDataAreaSlice;
Trs: IEaxDataAreaTransformations;
Tr: IEaxDataAreaTransformation;
i: integer;
Begin
MB := MetabaseClass.Active;
Express := MB.ItemById("EXPRESS").Edit As IEaxAnalyzer;
// Get analytical data area slice
Slice := Express.DataArea.Slices.Item(0);
// For all data transformation formulas set the calculation type - after totals
Trs := Slice.CalcTransformations;
For i := 1 To trs.Count - 1 Do
Tr := Trs.Item(i);
Tr.CalculationMode := EaxDataAreaTransformationCalculationMode.AfterCalcTotals;
End For;
(Express As IMetabaseObject).Save;
End Sub UserProc;
After executing the example values of all added calculated elements will be visible in the table.
Imports Prognoz.Platform.Interop.Express;
…
Public Shared Sub Main(Params: StartParams);
Var
MB: IMetabase;
Express: IEaxAnalyzer;
Slice: IEaxDataAreaSlice;
Trs: IEaxDataAreaTransformations;
Tr: IEaxDataAreaTransformation;
i: integer;
Begin
MB := Params.Metabase;
Express := MB.ItemById["EXPRESS"].Edit() As IEaxAnalyzer;
// Get analytical data area slice
Slice := Express.DataArea.Slices.Item[0];
// For all data transformation formulas set the calculation type - after totals
Trs := Slice.CalcTransformations;
For i := 1 To trs.Count - 1 Do
Tr := Trs.Item[i];
Tr.CalculationMode := EaxDataAreaTransformationCalculationMode.edatcmAfterCalcTotals;
End For;
(Express As IMetabaseObject).Save();
End Sub;
See also: