Opens a standard dialog box that is used to set up batch export of regular report including options to set additional parameters for dialog opening.
Command parameters are passed in the Data property. Executing the command requires to specify the following value in this property:
Value type | Description |
IPrxBulkSelectionSet | The selection of dimensions allowed to be used on batch print. The specified selection is set for dimensions on the first page of the dialog box. It can be changed later. |
The command is used only for regular reports. The printing is executed after appropriate parameters are selected in the dialog box and the Print button is clicked. Executing the command shows the checkbox with the value that indicates whether the Print button is clicked (True) or the Cancel button is clicked (False).
Executing the example requires a form, the Button1 button on the form, the ReportBox component and the UiReport component named UiReport1, which is used as a data source for the ReportBox component. The UiReport1 component is connected to a regular report, for which batch print is available.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
Rep: IPrxReport;
SelSet: IPrxBulkSelectionSet;
Target: IUiCommandTarget;
Context: IUiCommandExecutionContext;
Res: Variant;
Begin
Rep := UiReport1.Instance As IPrxReport;
SelSet := Rep.GetBulkSelectionSet("1,2");
//Selection of all elements in the first dimension
//This selection is displayed for dimension in the dialog
SelSet.Item(0).Selection.SelectAll;
Target := WinApplication.Instance.GetPluginTarget("Report");
Context := Target.CreateExecutionContext;
Context.Data := SelSet;
Res := Target.Execute("ShowBulkPrintDialogEx", Context);
End Sub Button1OnClick;
Clicking the button opens a dialog box for batch print of report. All elements in the first dimension are selected in the dialog box. The result of closing the dialog box is available in the Res variable.
Executing the example requires a form, the Button1 button, the ReportBoxNet component and the UiReportNet component named UiReportNet1, which is used as a data source for the ReportBoxNet component. The UiReport1 component is connected to a regular report, for which batch print is available.
Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Var
WinApp: WinApplication = New WinApplicationClass_2();
Rep: IPrxReport;
SelSet: IPrxBulkSelectionSet;
Target: IUiCommandTarget;
Context: IUiCommandExecutionContext;
Res: Object;
Begin
Rep := UiReportNet1.ReportUi.Report;
SelSet := Rep.GetBulkSelectionSet("1,2");
//Selection of all elements in the first dimension
//This selection is displayed for dimension in the dialog
SelSet.Item[0].Selection.SelectAll();
Target := WinApp.GetPluginTarget("Report");
Context := Target.CreateExecutionContext();
Context.Data := SelSet;
Res := Target.Execute("ShowBulkPrintDialogEx", Context, Null);
End Sub;
Clicking the button opens a dialog box for batch printing of report. All elements in the first dimension are selected in the dialog box. The result of closing the dialog box is available in the Res variable.
See also: