PrintReport Method

       

At run time, prints the data report created with the Data Report designer.

Syntax

object.PrintReport(ShowDialog, Range, PageFrom, PageTo)

The PrintReport method syntax has these parts:

Part Description
object Required. An object expression that evaluates to an object in the Applies To list.
ShowDialog Optional. A boolean expression that determines if the Print dialog box is shown.
Range Optional. Sets an integer that determines if all the pages in the report will be executed or a range of pages, as shown in Settings.
PageFrom Optional. An integer that sets the page from which to start printing.
PageTo Optional. An integer that sets the page at which to stop printing.

Settings

Constant Value Description
rptRangeAllPages 0 (Default) All pages will be printed.
rptRangeFromTo 1 Only the specified range of pages will be exported.

Return Type

Long

Remarks

If no arguments are supplied with the method, a dialog box will be displayed prompting the user for appropriate information.

The PrintReport method performs an asynchronous operation. The PrintReport method returns the identifier of the "cookie" that identifies the asynchronous operation.