Send to page preview

Command group Flag affected Reversible Execute on client Platform(s)
Report destinations NO YES NO All

Syntax

Send to page preview ([Do not wait for user][,Hide until complete]) title[/left/top/width/height/stk/cen/max]

Options

Do not wait for user Unless this option is specified, the user must close the window before method execution continues and before doing anything else
Hide until complete If specified, the report window is not displayed until the report has been completely generated

Description

This command sends the report instance to a page preview screen. This lets the user check the final page layout before printing. On small screens, the text is Greeked, that is, each character is represented by a dot.

The Do not wait for user option allows subsequent method lines to execute or lets the user do other things without closing the report; the default is to gray out all menus while a screen report is displayed. You may want to have several reports on the screen for reference while doing some other work with the library. Without the option, the user must close the window before doing anything else.

The Hide until Complete option suppresses the output until all the report data is ready. Normally, you can view the first part of the report before all the records have been prepared.

Title and Position

You can give each page preview a title and control its position and size. The Left/Top/Right/Bottom values fix the positions of the four corners to screen pixel resolution. The /STK parameter offsets the top left-hand corner from the last page preview and /CEN positions the page preview in the middle of the screen.

The Page preview window can be opened maximized by specifying the /MAX parameter or in $windowprefs.

If you change the shape and size of the page preview window it will no longer reflect the paper size.

If you use Send to page preview in a reversible block, the report destination reverts to its former setting when the method terminates.

Example

# Example shows how to stack 2 page previews showing UK and US customers
Set report name rMyReport
Send to page preview (Do not wait for user) UK customers/STK
Set search as calculation {cCountry='UK'}
Print report (Use search,Do not finish others) {rInst1}
Send to page preview (Do not wait for user) USA customers/STK
Set search as calculation {cCountry='USA'}
Print report (Use search,Do not finish others) {rInst2}