AutoUpdateSources: TriState;
The AutoUpdateSources property determines whether autoupdate is used in the dashboard.
The AutoUpdateSources value affects the value of the IAdhocDataSourceObjects.AutoUpdateSources property. If AutoUpdateSources is set to:
TriState.Undefined. Value of IAdhocDataSourceObjects.AutoUpdateSources will not change.
TriState.OnOption. IAdhocDataSourceObjects.AutoUpdateSources will be set to True.
TriState.OffOption. IAdhocDataSourceObjects.AutoUpdateSources will be set to False.
Executing the example requires that the repository contains a dashboard with the DASHBOARD_UPD identifier.
Add links to the Adhoc, Metabase system assemblies.
Sub UserProc;
Var
mb: IMetabase;
DashboardObj: IMetabaseObject;
Dashboard: IAdhocReport;
Begin
mb := MetabaseClass.Active;
DashboardObj := mb.ItemById("DASHBOARD_UPD").Edit;
Dashboard := DashboardObj As IAdhocReport;
If (Dashboard.AutoUpdateSources = TriState.OffOption) Or (Dashboard.AutoUpdateSources = TriState.Undefined) Then
Dashboard.AutoUpdateSources := TriState.OnOption;
End If;
DashboardObj.Save;
End Sub UserProc;
After executing the example the autoupdate is enabled for the dashboard.
See also: