UndoRedo: IUndoRedo;
UndoRedo: Prognoz.Platform.Interop.ForeSystem.IUndoRedo;
The UndoRedo property determines parameters of the undo/redo stack in the chart.
Executing the example requires a chart in the regular report with the REGULAR_REPORT identifier. Add links to the Metabase, Chart, Report, Tab system assemblies in the unit.
Sub UserProc;
Var
Sheet: IPrxSheet;
MB: IMetabase;
Report: IPrxReport;
Chart: IChart;
UnRed:IUndoRedo;
Begin
// Get repository
MB := MetabaseClass.Active;
// Get regular report
Report := MB.ItemById("REGULAR_REPORT").Edit As IPrxReport;
// Get undo/redo stack of regular report
UnRed:= Report.UndoRedo;
// Set availability and number of undo/redo stack operations
UnRed.Enabled:= True;
UnRed.Limit:= 20;
(Report As IMetabaseObject).Save;
End Sub UserProc;
After executing the example the Undo/Redo stack is available for the chart; the number of available undo/redo operations is set to 20 operations.
The requirements and result of the Fore.NET example execution match with those in the Fore example.
Imports Prognoz.Platform.Interop.Chart;
Imports Prognoz.Platform.Interop.Report;
Imports Prognoz.Platform.Interop.Tab;
Imports Prognoz.Platform.Interop.ForeSystem;
Public Shared Sub Main(Params: StartParams);
Var
Sheet: IPrxSheet;
MB: IMetabase;
Report: IPrxReport;
Chart: IChart;
UnRed:IUndoRedo;
Begin
// Get repository
MB:= Params.Metabase;
// Get regular report
Report := MB.ItemById["REGULAR_REPORT"].Edit() As IPrxReport;
// Get undo/redo stack of regular report
UnRed:= Report.UndoRedo;
// Set availability and number of undo/redo stack operations
UnRed.Enabled:= True;
UnRed.Limit:= 20;
(Report As IMetabaseObject).Save();
End Sub;
See also: