ShowBulkExportDialog Command

Purpose

Opens a standard dialog box of batch export of a regular report.

Parameters of Use

Command parameters are passed in the Data property. Executing the command requires to specify the regular report described by the IPrxReport, interface, or an array of the Variant type, which elements contain the following values:

Value type Description
Element 1: IPrxReport The regular report, for which batch export dialog box opens.
Element 2: Boolean The checkbox, which determines whether hidden sheets are exported.

Application Features

The command can be used only for regular reports. Batch export is executed after appropriate parameters are selected in the dialog box and the Finish button is pressed.

Fore Example

Executing the example requires a form with the Button1 button, 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 export is available.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    Target: IUiCommandTarget;
    Context: IUiCommandExecutionContext;
    Data: Array;
Begin
    Target := WinApplication.Instance.GetPluginTarget("Report");
    Context := Target.CreateExecutionContext;
    Data := New Variant[2];
    Data[0] := UiReport1.Instance;
    Data[1] := False;
    Context.Data := Data;
    Target.Execute("ShowBulkExportDialog", Context);
End Sub Button1OnClick;

Clicking the button opens a dialog box for batch export of report. Hidden sheets are not exported.

Fore.NET Example

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 UiReportNet1 component is connected to a regular report, for which batch export is available.

Imports Prognoz.Platform.Interop.Report;
Imports Prognoz.Platform.Interop.Ui;

Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Var
    WinApp: WinApplication = New WinApplicationClass_2();
    Target: IUiCommandTarget;
    Context: IUiCommandExecutionContext;
    Data: Array;
Begin
    Target := WinApp.GetPluginTarget("Report");
    Context := Target.CreateExecutionContext();
    Data := New Object[2];
    Data[0] := UiReportNet1.ReportUi.Report;
    Data[1] := False;
    Context.Data := Data;
    Target.Execute("ShowBulkExportDialog", Context, Null);
End Sub;

Clicking the button opens a dialog box for batch export of report. Hidden sheets are not exported.

See also:

IUiCommandTarget.Execute