ShowBulkPrintDialog Command

Purpose

Opens a standard dialog box for batch print of an express report.

Parameters of Use

Command parameters are passed in the Data property. Executing the command requires to specify an array of the Variant type in this property, the elements of this array contain the following values:

Value type Description
Element 1: IEaxAnalyzer Express report.
Element ]2: Boolean The checkbox that enables system printing. If the value is False, on closing the wizard printing should be executed in the application code.
Element 3: Boolean The checkbox that enables the warnings that printing conditions are not satisfied in the report. If the parameter is set to True, an attempt to print a report with unfulfilled conditions is followed by the warning that printing will be stopped, and the Execute method will return the printing result, which is False. If the parameter is set to False, on an attempt to print the report with unfulfilled conditions, printing will be stopped without warnings, and the Execute method will return the printing result, which is False.

Application Features

The Execute method in the correct express report will return the result of printing:

Example

Executing the example requires a form and a button named Button1 on the form. The repository contains an express report with the EXPRESS_REPORT identifier.

Add links to the Express, Metabase and Ui system assemblies.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var Target: IUiCommandTarget;
    Context: IUiCommandExecutionContext;
    Data: Array;
    Result: Array;
    m_Analyzer : IEaxAnalyzer;
Begin
    m_Analyzer := MetabaseClass.Active.ItemById("EXPRESS_REPORT").Bind As IEaxAnalyzer;
    Target := WinApplication.Instance.GetPluginTarget("Express");
    Context := Target.CreateExecutionContext;
    Data := New Variant[3];
    Data[0] := m_Analyzer;
    Data[1] := True;
    Data[2] := True;
    Context.Data := Data;
    Result := Target.Execute("ShowBulkPrintDialog", Context) As Array;
    debug.WriteLine("Printing result: " + (Result[0As Boolean).ToString);
End Sub Button1OnClick;

After executing the example the express report is printed out by the defined parameters, the console window displays printing result.

See also:

IUiCommandTarget.Execute