UpdateSettings: IViewerUpdateSettings;
UpdateSettings: Prognoz.Platform.Interop.ForeSystem.ViewerUpdateSettings;
The UpdateSettings property returns settings of dashboard autoupdate options.
Executing the example requires that the repository contains a dashboard with the ADHOC identifier.
Add links to the Adhoc and Metabase system assemblies.
Sub UserProc;
Var
Metabase: IMetabase;
Adhoc: IAdhocReport;
UpdateOption: IViewerUpdateSettings;
Begin
Metabase := MetabaseClass.Active;
Adhoc := Metabase.ItemById("ADHOC").Edit As IAdhocReport;
UpdateOption := Adhoc.UpdateSettings;
// Set up autoupdate options
UpdateOption.AutoUpdateByData := False;
UpdateOption.AutoUpdateIntervalUnits := TimeUnits.Minutes;
UpdateOption.AutoUpdateInterval := 10;
UpdateOption.UpdateByIntervalEnabled := True;
Debug.WriteLine("Report autoupdate options: " + UpdateOption.AsString);
(Adhoc As IMetabaseObject).Save;
End Sub UserProc;
Executing the example disables dashboard update on selection change. A dashboard will be updated automatically at 10 minutes interval. The console window displays dashboard autoupdate options.
The requirements and result of the Fore.NET example match with those in the Fore example.
Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.AdHoc;
Imports Prognoz.Platform.Interop.ForeSystem;
…
Public Shared Sub Main(Params: StartParams);
Var
Metabase: IMetabase;
Adhoc: IAdhocReport;
UpdateOption: IViewerUpdateSettings;
Begin
Metabase := Params.Metabase;
Adhoc := Metabase.ItemById["ADHOC"].Edit() As IAdhocReport;
UpdateOption := Adhoc.UpdateSettings;
// Set up autoupdate options
UpdateOption.AutoUpdateByData := False;
UpdateOption.AutoUpdateIntervalUnits := TimeUnits.tuMinutes;
UpdateOption.AutoUpdateInterval := 10;
UpdateOption.UpdateByIntervalEnabled := True;
System.Diagnostics.Debug.WriteLine("Report autoupdate options: " + UpdateOption.AsString);
(Adhoc As IMetabaseObject).Save();
End Sub;
See also: