IAdhocReport.UpdateSettings

Fore Syntax

UpdateSettings: IViewerUpdateSettings;

Fore.NET Syntax

UpdateSettings: Prognoz.Platform.Interop.ForeSystem.ViewerUpdateSettings;

Description

The UpdateSettings property returns settings of dashboard autoupdate options.

Fore Example

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.

Fore.NET Example

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:

IAdhocReport