RecalcEaxObject(Obj: IEaxObject): TriState;
RecalcEaxObject(Obj: Prognoz.Platform.Interop.Express.IEaxObject]: Prognoz.Platform.Interop.ForeSystem.TriState;
Obj. Report object.
The RecalcEaxObject property determines whether it is required to calculate selected object.
Executing the example requires that the repository contains a regular report with the REGULAR_REPORT_DATAAREA identifier.
Add links to the Express, ForeSystem (for the Fore.NET examples), Metabase, Report system assemblies.
Sub UserProc;
Var
MB: IMetabase;
MObj: IMetabaseObject;
Report: IPrxReport;
Context: IPrxReportRecalcContext;
DataArea: IEaxDataArea;
EaxObj: IEaxObject;
Begin
// Get repository
MB := MetabaseClass.Active;
// Get report
MObj := MB.ItemById("REGULAR_REPORT_DATAAREA").Edit;
Report := MObj As IPrxReport;
// Get calculation context
Context := Report.CreateRecalcContext;
Context.Clear;
//Get analytical data area
DataArea := Report.DataArea;
//Get express report table
EaxObj := (DataArea.Views.Item(0) As IEaxAnalyzer).Grid;
//Calculate report
Context.RecalcEaxObject(EaxObj) := TriState.OnOption;
Report.RecalcC(Context);
//Save calculation result
MObj.Save;
End Sub UserProc;
Imports Prognoz.Platform.Interop.Express;
Imports Prognoz.Platform.Interop.ForeSystem;
Imports Prognoz.Platform.Interop.Report;
…
Public Shared Sub Main(Params: StartParams);
Var
MB: IMetabase;
MObj: IMetabaseObject;
Report: IPrxReport;
Context: IPrxReportRecalcContext;
DataArea: IEaxDataArea;
EaxObj: IEaxObject;
Begin
// Get repository
MB := Params.Metabase;
// Get report
MObj := MB.ItemById["REGULAR_REPORT_DATAAREA"].Edit();
Report := MObj As IPrxReport;
// Get calculation context
Context := Report.CreateRecalcContext();
Context.Clear();
//Get analytical data area
DataArea := Report.DataArea;
//Get express report table
EaxObj := (DataArea.Views.Item[0] As IEaxAnalyzer).Grid;
//Calculate report
Context.RecalcEaxObject[EaxObj] := TriState.tsOnOption;
Report.RecalcC(Context);
//Save calculation result
MObj.Save();
End Sub;
After executing the example the report is calculated.
See also: