UndoRedo: IUndoRedo;
UndoRedo: Prognoz.Platform.Interop.ForeSystem.UndoRedo;
The UndoRedo property returns undo/redo stack parameters of express report table.
To use undo/redo stack parameters, the IUndoRedo.Enabled property must be set to True.
Executing the example requires an express report with the EXPRESS_REPORT identifier containing a table.
Add links to the Express, Metabase, and Pivot system assemblies.
Sub UserProc;
Var
Metabase: IMetabase;
Analyzer: IEaxAnalyzer;
Pivot: IPivot;
UndoRedo: IUndoRedo;
Begin
// Get repository
Metabase := MetabaseClass.Active;
// Get express report
Analyzer := Metabase.ItemById("EXPRESS_REPORT").Edit As IEaxAnalyzer;
// Get express report table
Pivot := Analyzer.Pivot;
//Get table undo/redo stack
UndoRedo := Pivot.UndoRedo;
// Set availability and number of stack changes
UndoRedo.Enabled := True;
UndoRedo.Limit := 20;
//Save changes in express report
(Analyzer As IMetabaseObject).Save;
End Sub UserProc;
After executing the example an undo/redo stack is available for express report table; the number of available undo/redo operations is limited to 20 operations.
The requirements and result of the Fore.NET example execution match with those in the Fore example.
Imports Prognoz.Platform.Interop.Express;
Imports Prognoz.Platform.Interop.Pivot;
Imports Prognoz.Platform.Interop.ForeSystem;
Public Shared Sub Main(Params: StartParams);
Var
Metabase: IMetabase;
Analyzer: IEaxAnalyzer;
Pivot: IPivot;
UndoRedo: UndoRedo;
Begin
// Get repository
Metabase := Params.Metabase;
// Get express report
Analyzer := Metabase.ItemById["EXPRESS_REPORT"].Edit() As IEaxAnalyzer;
// Get express report table
Pivot := Analyzer.Pivot;
//Get table undo/redo stack
UndoRedo := Pivot.UndoRedo;
// Set availability and number of stack changes
UndoRedo.Enabled := True;
UndoRedo.Limit := 20;
//Save changes in express report
(Analyzer As IMetabaseObject).Save();
End Sub;
See also: