Type: Boolean
The printPreview property of the Printer class specifies whether the printed output is to be directed to the preview file. This property cannot be modified after printing has begun. The default value is false.
The following example shows the use of the printPreview property.
buttonPreview_click(btn: Button input) updating; vars report : ReportForm; begin // Creates an instance of the ReportForm transient form class, and // references it by the report local variable. This variable can then // access the controls on the form. create report; // Specifies that the output is to be directed to the preview file // before being printed. app.printer.printPreview := true; // Specifies the format of the pages to be printed. As these are // the default values, it is unnecessary to redefine them unless // a different format is required. app.printer.orientation := Print_Portrait; app.printer.documentType := Print_A4; // Uses the print method to output frameDetail of the form to the print // preview file twice. The close method then sends all buffered // output to the preview file. The preview file becomes available // for browsing at this point. app.printer.print(report.frameDetail); app.printer.print(report.frameDetail); app.printer.close; epilog // Deletes the transient report form instance. delete report; end;
See also "Previewing Print Output", later in this section.