setPreviewOptions

setPreviewOptions(printPreview:      Boolean;
                  previewAllowPrint: Boolean;
                  previewReduce:     Boolean;
                  suppressDialog:    Boolean;
                  title:             String);

The setPreviewOptions method of the JadeReportWriterReport class sets the Printer class preview attributes to be used when running the report and directing output to a printer.

Use the setPageOptions method to set the paper size values.

The parameters for the setPreviewOptions method are listed in the following table.

Parameter Description
printPreview Specifies whether the printed output is to be directed to the preview file (for details, see the Printer class printPreview property)
previewAllowPrint Specifies whether previewed output can be directed to the printer (for details, see the Printer class printPreviewAllowPrint property)
previewReduce Specifies whether previewed output is reduced to display a full page on the screen (for details, see the Printer class printPreviewReduce property)
suppressDialog Specifies whether the system-supplied print progress dialog is to be displayed (for details, see the Printer class suppressDialog property)
title Contains the title to be displayed on the system-supplied print progress dialog (for details, see the Printer class title property)

The following example shows the use of a JadeScript class setPreviewOptions method.

runReport();
vars
    jrwm : JadeReportWriterManager;
    jrep : JadeReportWriterReport;
begin
    create jrwm transient;
    jrep := jrwm.getReport("Employees - ABC");
    if jrep = null then
        return;
    endif;
    jrep.setPreviewOptions(true, true, false, false, "Printing");
    jrep.run;
epilog
    delete jrwm;
    delete jrep;
end;