IGxDocument.Print

Syntax

Print(Printer: IGxDocumentPrinter; SectionIndex: Integer; RangeIndex: Integer; Pages: String);

Parameters

Printer. The printer that prints the document.

SectionIndex. The number of the section to be printed (-1 if all document sections should be printed).

RangeIndex. The print range number (0 - the entire document; 1 - the current page; 2 - the selected range).

Pages. Pages in the section that are necessary to print.

Description

The Print method prints to a printer in accordance with the specified print options.

Comments

In regular report a separate sheet is regarded as a section, in express report and workspace the entire document is regarded as a section.

In the Pages option the pages are specified as follows:

Example

Executing the example requires that the repository contains a regular report with the REPORT identifier.

Sub UserProc;
Var
    MB: IMetabase;
    Printer: IGxPrinter;
    DocPrint: IGxDocumentPrinter;
    Document: IGxDocument;
Begin
    MB := MetabaseClass.Active;
    Printer := GxPrinters.DefaultPrinter;
    DocPrint := Printer As IGxDocumentPrinter;
    Document := MB.ItemById("REPORT").Bind As IGxDocument;
    Document.Print(DocPrint, 10"1");
End Sub UserProc;

After executing the example the first page from the first section is printed on a default operating system printer.

See also:

IGxDocument