UndoRedo: 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.
See also: