UndoRedo: IUndoRedo;
UndoRedo : Prognoz.Platform.Interop.ForeSystem.IUndoRedo;
The UndoRedo property determines parameters of Undo/Redo stack for external legend of the regular report chart.
Executing the example requires a regular report with the REGULAR_REPORT identifier, in which a chart and an external legend are added. Add links to the Metabase, Report, Tab system assemblies.
Sub UserProc;
Var
MB: IMetabase;
Report: IPrxReport;
Legend: IPrxChartLegend;
Objects: ITabObjects;
UnRed: IUndoRedo;
Begin
MB := MetabaseClass.Active;
Report := MB.ItemById("REGULAR_REPORT").Edit As IPrxReport;
Objects := (Report.ActiveSheet As IprxTable).TabSheet.Objects;
Legend := Objects.Item(1).Extension As IPrxChartLegend;
UnRed := Legend.UndoRedo;
UnRed.Enabled := True;
UnRed.Limit := 5;
(Report As IMetabaseObject).Save;
End Sub UserProc;
After executing the example the Undo/Redo stack is available for the external legend of the chart, the maximum number of undo/redo operations is limited to 50.
Add a link to the ForeSystem assembly to execute the 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.Report;
Imports Prognoz.Platform.Interop.Tab;
Imports Prognoz.Platform.Interop.ForeSystem;
Public Shared Sub Main(Params: StartParams);
Var
MB: IMetabase;
Report: IPrxReport;
Legend: IPrxChartLegend;
Objects: ITabObjects;
UnRed: IUndoRedo;
Begin
MB := Params.Metabase;
Report := MB.ItemById["REGULAR_REPORT_LEGEND"].Edit() As IPrxReport;
Objects := (Report.ActiveSheet As IprxTable).TabSheet.Objects;
Legend := Objects.Item[1].Extension As IPrxChartLegend;
UnRed := Legend.UndoRedo;
UnRed.Enabled := True;
UnRed.Limit := 5;
(Report As IMetabaseObject).Save();
End Sub;
See also: