IGxDocument.Print

Syntax

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

Parameters

Printer. Printer that prints the document.

SectionIndex. The number of the section that is necessary to print (-1 if it is necessary to print all sections of the document).

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 the Pages option the pages are specified in the following way:

Example

Sub Main;

Var

MB: IMetabase;

Printer: IGxPrinter;

DocPrint: IGxDocumentPrinter;

Docum: IGxDocument;

Begin

MB:=MetabaseClass.Active;

Printer:=GxPrinters.DefaultPrinter;

DocPrint:=Printer As IGxDocumentPrinter;

Docum:=MB.ItemById("Report").Bind As IGxDocument;

Docum.Print(DocPrint,1,0,"1");

End Sub Main;

After executing the example the first page from the first section is printed on a default operating system printer. A data source of the document is a regular report with the Report identifier.

See also:

IGxDocument