Display (preview the report)


Top  Previous  Next

 

Display( [zoom] [, page] [, across] [, down] ), VIRTUAL, PROC

Display

Displays the report image metafiles.

zoom

An integer constant, variable, EQUATE, or expression containing the initial zoom factor for the print preview display. If omitted, the Display method uses the default zoom factor in the ABREPORT.TRN file.

page

An integer constant, variable, EQUATE, or expression containing the initial page number to display. If omitted, page defaults to one (1).

across

An integer constant, variable, EQUATE, or expression containing the number of horizontal thumbnails for the initial print preview display. If omitted, across defaults to one (1).

down

An integer constant, variable, EQUATE, or expression containing the number of vertical thumbnails for the initial print preview display. If omitted, down defaults to one (1).

The Display method displays the report image metafiles and returns a value indicating whether or not to print them. A return value of one (1 or True) indicates the end user asked to print the report; a return value of zero (0 or False) indicates the end user did not ask to print the report.

The Display method is the print preview engine. It manages the print preview, providing navigation, zoom, thumbnail configuration, plus the option to immediately print the report.

Implementation:

The Display method declares the preview WINDOW, then calls the WindowManager.Ask method to display the preview WINDOW and process its events.

EQUATEs for the zoom parameter are declared in ABREPORT.INC:

NoZoom            EQUATE(-2)

PageWidth         EQUATE(-1)

In addition to the EQUATE values, you may specify any integer zoom factor, such as 50 (50% zoom) or 200 (200% zoom).

Return Data Type:     BYTE

Example:

IF ReportCompleted                  !if report was not cancelled

 ENDPAGE(report)                    !force final page overflow

 IF PrtPrev.Display()               !preview the report on-line

  report{PROP:FlushPreview} = True  !and print it if user asked to

 END

END

See Also:     WindowManager.Ask