It opens a standard dialog box that is used to copy/move sheets.
Command parameters are passed in the Data property. Executing the command requires to specify the following value in this property:
Value type | Description |
IPrxSheets | The collection of regular report sheets. |
The command can be used only for regular reports. Executing the command shows logical True if the OK button is clicked in the dialog box, and False if the Cancel button is clicked.
Executing the example requires a form, the Button1 button on this form, the ReportBox component and the UiReport component named UiReport1, which is used as a data source for the ReportBox component. The regular report linked to the UiReport1 component contains several sheets.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
Report: IPrxReport;
Target: IUiCommandTarget;
Context: IUiCommandExecutionContext;
Begin
Report := UiReport1.Instance As IPrxReport;
Target := WinApplication.Instance.GetPluginTarget("Report");
Context := Target.CreateExecutionContext;
Context.Data := Report.Sheets;
Target.Execute("MoveCopySheet", Context);
End Sub Button1OnClick;
Clicking the button opens the dialog for copying or moving sheets.
See also: