PrintReport Subroutine

Prints the specified Crystal Report.

Syntax

PrintReport Report, [Prompt],[Copies],[Coll],[StartNo],[EndNo], [intErrorMode]

Properties

The PrintReport subroutine syntax has these parts:

Part

Description

Report

String. The name of the report to print, including the file's full path.

Prompt

Boolean. (Optional) If True, the user is prompted with the open report dialog, allowing the user to select the report to print. If False, the report specified is printed. This option is ignored in Crystal XI.

Copies

Long. (Optional) The number of copies to print. Default = 1. This option is ignored in Crystal XI.

Coll

Boolean. (Optional) If True, the reports are collated. If False, they are not. This option is ignored in Crystal XI.

StartNo

Long. (Optional) The first page of the report to print. This option is ignored in Crystal XI.

EndNo

Long. (Optional) The last page of the report to print. This option is ignored in Crystal XI.

intErrorMode

Integer. (Optional). The error mode. This option is ignored in Crystal XI.

0 (default) – Allows the subroutines to provide the error messages. Errors are displayed in the form of a message box. If no entry is made for the intErrorMode parameter, the default is used.

1 - Allows the user to handle the error messages. Errors in the subroutines are passed back to the calling routine for handling.

2 – Writes errors to all destinations. No error messages display. Instead, the errors are written to all iFIX destinations, including the Alarm History window destinations using SendOperatorMessage.

 

Example