Begin print job

Command group Flag affected Reversible Execute on client Platform(s)
Reports and Printing YES NO NO All

Syntax

Begin print job ([Send to PDF])

Options

Send to PDF If specified, the print job sends its reports to a single PDF file rather than a printer document

Description

This command defines the beginning of an Omnis print job which is ended by the command End print job. Only one print job can be started at any time: you cannot nest Begin print job commands.

If printing is already in progress, Begin print job returns an error and sets the flag to false. It also returns an error if it cannot set up the printer, or open the printer document; again, it sets the flag to false in this case.

Begin print job sets the flag to true if it succeeds. It automatically sets the report destination to the printer and closes the report destination selection window if it is open.

Each report is printed in the same way as if it were in an individual document. If you print two reports in a job, then page numbering starts at 1 for each report.

You cannot change the page setup while a print job is in progress, although Omnis does not try to enforce this, as it will probably cause an OS error (and abnormal termination of printing) if you do.

The Begin print job and End print job commands only apply to reports sent to a printer, via the printer report destination.

Example

# Create a print job and send 2 reports to the printer
Begin print job
Set report name rMyReport
Print report
Set report name rMyReport2
Print report
End print job