CalcOnChangedData: Boolean;
CalcOnChangedData: boolean;
The CalcOnChangedData property determines whether formula calculation is applied to changed data without saving it for analytical area slice.
Available values:
True. Formulas are calculated on changed data.
False. Formulas are not calculated on changed data.
To execute the example the repository must contain a regular report with the REPORT identifier.
Add links to the Express, Metabase, Report system assemblies.
Sub UserProc;
Var
MB: IMetabase;
Report: IPrxReport;
DataArea: IEaxDataArea;
RepGrid: IEaxGrid;
PivSlice: IEaxDataAreaPivotSlice;
Begin
// Get repository
MB := MetabaseClass.Active;
// Get analytical data area of regular report
Report := MB.ItemById("REPORT").Edit As IPrxReport;
DataArea := Report.DataArea;
// Get data view - table
RepGrid := DataArea.Views.Item(0) As IEaxGrid;
// Get base for building analytical area slice
PivSlice := DataArea.Slices.Item(0) As IEaxDataAreaPivotSlice;
// Set formula calculation on changed data
If (PivSlice.CalcOnChangedData = False) Then
PivSlice.CalcOnChangedData := True;
End If;
// Save report
(Report As IMetabaseObject).Save;
End Sub UserProc;
Imports Prognoz.Platform.Interop.Express;
Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.Report;
…
Public Shared Sub Main(Params: StartParams);
Var
MB: IMetabase;
Report: IPrxReport;
DataArea: IEaxDataArea;
RepGrid: IEaxGrid;
PivSlice: IEaxDataAreaPivotSlice;
Begin
// Get repository
MB := Params.Metabase;
// Get analytical data area of regular report
Report := MB.ItemById["REPORT"].Edit() As IPrxReport;
DataArea := Report.DataArea;
// Get data view - table
RepGrid := DataArea.Views.Item[0] As IEaxGrid;
// Get base for building analytical area slice
PivSlice := DataArea.Slices.Item[0] As IEaxDataAreaPivotSlice;
// Set formula calculation on changed data
If (PivSlice.CalcOnChangedData = False) Then
PivSlice.CalcOnChangedData := True;
End If;
// Save report
(Report As IMetabaseObject).Save();
End Sub;
After executing the example, formula calculation on changed data without their saving will be enabled for analytical area slice of regular report.
See also: