User Tools

Site Tools


display_preview_the_report_.htm
Navigation:  ABC Library Reference > PrintPreviewClass > PrintPreviewClass Methods >====== Display (preview the report) C6H0009.jpg ====== Previous pageReturn to chapter overviewNext page

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

blk2blue.jpg

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

display_preview_the_report_.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1