IAdhocReport.UndoRedo

Fore Syntax

UndoRedo: IUndoRedo;

Fore.NET Syntax

UndoRedo: Prognoz.Platform.Interop.ForeSystem.IUndoRedo;

Description

The UndoRedo property determines parameters of dashboard undo/redo stack.

Fore Example

Executing the example requires that the repository contains a dashboard with the ADHOC identifier.

Add links to the Metabase, Adhoc system assemblies.

Sub UserProc;
Var
    mb: IMetabase;
    repObj: IMetabaseObject;
    report: IAdhocReport;
    UnRed: IUndoRedo;
Begin
    mb := MetabaseClass.Active;
    repObj := mb.ItemById("OBJ_ADHOC").Edit;
    report := repObj As IAdhocReport;
    // Set changes stack
    UnRed := report.UndoRedo;
    // Set parameters of undo/redo stack: availability and number of changes.
    UnRed.Enabled := True;
    UnRed.Limit := 20;
    // Save changes.
    repObj.Save;
End Sub UserProc;

After executing the example the number of undo or redo operations is limited to 20 for undo/redo stack of the report.

Fore.NET Example

The requirements and result of the Fore.NET example execution 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
    mb: IMetabase;
    repObj: IMetabaseObject;
    report: IAdhocReport;
    UnRed: IUndoRedo;
Begin
    mb := Params.Metabase;
    repObj := mb.ItemById["OBJ_ADHOC"].Edit();
    report := repObj As IAdhocReport;
//Set undo/redo stack     UnRed := report.UndoRedo;
//Set parameters of undo/redo stack:availability and number of changes.     UnRed.Enabled := True;
    UnRed.Limit := 20;      
//Save changes.     repObj.Save();  
End Sub;

See also:

IAdhocReport