OutputPage Method

Provides access to the current page or the full range of pages for a report run, according to the value of the ListenerType property.

oReportListener.OutputPage(;
                  nPageNo, ;
                  eDevice, ;
                  nDeviceType ;
                 [,nleft, nTop, nWidth, nHeight ;
                 [,nClipLeft,nClipTop, nClipWidth, nClipHeight]])

Parameters

nPageNo

In page-at-a-time mode (ListenerType values 0 and 2), ReportListener uses this parameter to send you the current page number as it prepares each page for output. You can request that this single page be rendered to an alternate device at this point.

In all pages-at-once mode (ListenerType values 1 and 3), you use this parameter to send the ReportListener the page number you wish to render.

For more information about supported ListenerType values, see ListenerType Property.

eDevice

Provides a handle, reference, or filename for the device to which output is rendered.

When its ListenerType property value is 0, ReportListener uses this parameter to send you a GDI+ graphics handle to the current printer. When its ListenerType property value is 2, output is not actually going to a printer, so ReportListener sends you the value 0.

In all pages-at-once mode (ListenerType values 1 and 3), you use this parameter to send the ReportListener one of the following:

  • A GDI handle to a printer.

  • A GDI+ graphics handle to another output device.

  • A reference to an object derived from either the Visual FoxPro Shape or Container baseclass.

  • A filename.

You tell the ReportListener what type of eDevice value you send in this parameter by sending an appropriate value in nDeviceType.

nDeviceType

Represents the type of Device to which output is rendered.

Value Device Type

-1

No device.

The ReportListener sends this value when it triggers OutputPage in ListenerType 2.

0

hDC (GDI handle).

You can send a GDI handle to the ReportListener, to send output to an alternate printer.

1

hGraphics (GDI+ graphics handle).

The ReportListener sends this value when it triggers OutputPage in ListenerType 0. You can send it to the ReportListener, to send output to a different GDI+ context, such as a window.

2

oFoxControl.

Use this value to tell the Report Listener to create a preview display, using a Visual FoxPro Shape or Container control.

100

This value specifies a filename, to be saved as image of EMF type.

101

This value specifies a filename, to be saved as image of TIFF type.

102

This value specifies a filename, to be saved as image of JPEG type.

103

This value specifies a filename, to be saved as image of GIF type.

104

This value specifies a filename, to be saved as image of PNG type.

105

This value specifies a filename, to be saved as image of BMP type.

201

This value specifies a page to be saved additively into a previously-created TIFF, generating a multi-page TIFF file.

NoteTip

The ReportListener is able to perform some extra optimization of this file format when you use this value before a report run finishes. For a ReportListener with ListenerType 0 or 2, the OutputPage event happens during this time. An example of this usage is shown below. For a ReportListener with ListenerType 1 or 3, you can call OutputPage during the AfterReport Event to take advantage of the optimization.

[nleft, nTop, nWidth, nHeight,[nClipLeft,nClipTop, nClipWidth, nClipHeight]]

These optional parameters are not relevant when nDeviceType is 2 (a Visual FoxPro control surface).

The first set of four coordinates (nleft, nTop, nWidth, nHeight) specifies the coordinates, in units of 1/960 inch (960 dpi), of the rectangle on the current device in which this occurrence of the layout element will be rendered. The second set of four coordinates (nClipLeft,nClipTop, nClipWidth, nClipHeight) allows a preview-type output device to indicate that only a portion of the page needs to be refreshed.

Expand imageReturn Value

Expand imageRemarks

Expand imageExamples

Expand imageSee Also


© , 1996-2020 • Updated: 11/10/20
Comment or report problem with topic