CalcOnChangedData: TriState;
The CalcOnChangedData property determines whether formula calculation is applied to changed data without saving data to dashboard.
Available values:
TriState.OnOption. Formulas are calculated on changed data.
TriState.OffOption. Formulas are not calculated on changed data.
TriState.Undefined. Default value. Formulas are not calculated on changed data.
Executing the example requires that the repository contains a dashboard with the DASHBOARD_CALC identifier.
Add links to the Adhoc, Metabase system assemblies.
Sub UserProc;
Var
mb: IMetabase;
DashboardObj: IMetabaseObject;
Dashboard: IAdhocReport;
Begin
// Get repository
mb := MetabaseClass.Active;
// Get dashboard
DashboardObj := mb.ItemById("DASHBOARD_CALC").Edit;
Dashboard := DashboardObj As IAdhocReport;
// Set calculation of formulas based on changed data
If (Dashboard.CalcOnChangedData = TriState.OffOption) Or (Dashboard.CalcOnChangedData = TriState.Undefined) Then
Dashboard.CalcOnChangedData := TriState.OnOption;
End If;
// Save dashboard
DashboardObj.Save;
End Sub UserProc;
After executing the example, formula calculation on changed data without their saving will be enabled for dashboard.
See also: