Skip to main content
Version: Next

Is in print preview

Is in print preview : Boolean

ParameterTypeDescription
Function resultBooleanTrue = Print preview,False = No print preview

Description

The Is in print preview command returns True if the Preview on Screen option is checked in the printing dialog box and False otherwise. This setting is local to the process.

Unlike the Get print preview command, Is in print preview returns the final value of the option, after the dialog box is validated by the user. So this command lets you determine with certainty whether printing actually takes place in "preview" mode.

Example

This example takes all types of printing into account:

 SET PRINT PREVIEW(True) //Print preview by default
 PRINT SETTINGS
 If(OK=1)
  //The user may have changed the print destination
    If(Is in print preview) // True if preview
       FORM SET OUTPUT([Invoices];"toScreen")
    Else
       FORM SET OUTPUT([Invoices];"toPrinter"
    End if
    OPEN PRINTING JOB
    ALL RECORDS([Invoices])
    PRINT SELECTION([Invoices];>)
    CLOSE PRINTING JOB
 End if

See also

Get print preview
SET PRINT PREVIEW

Properties

Command number1198
Thread safe