setPageOptions(documentType: Integer; orientation: Integer; copies: Integer; topOfPage: Integer; bottomOfPage: Integer; leftMargin: Integer; rightMargin: Integer; borderWidth: Integer; collate: Boolean; duplex: Integer);
The setPageOptions method of the JadeReportWriterReport class sets the
Use the getPageOptions method to obtain the current paper size values and the setPreviewOptions method to set the preview options that you require.
Your report is output to the current printer. Use the functionality provided by the
The parameters for the setPageOptions method are listed in the following table.
Parameter | Description |
---|---|
documentType | Contains the printer form type (for details, see the |
orientation | Contains the orientation of your printed output (for details, see the |
copies | Contains the number of copies to be printed (for details, see the |
topOfPage | Contains the margin at the top of the printed page of output (for details, see the |
bottomOfPage | Contains the margin at the bottom of the printed page of output (for details, see the |
leftMargin | Contains the left margin of the printed page of output (for details, see the |
rightMargin | Contains the right margin of the printed page of output (for details, see the |
borderWidth | Contains the width of a border that is to be printed around report pages (for details, see the |
collate | Contains the collation setting for print output; that is, whether the copies are printed in proper binding order by separating copies into groups (for details, see the |
duplex | Contains the duplex setting for the report output; that is, the number of sides on which the paper is printed (for details, see the |
The following example shows the use of the setPageOptions method.
btnRun_click(btn: Button input) updating; vars jrep : JadeReportWriterReport; strName, strProfile : String; intOrient, intIndex : Integer; stat, count : Integer; begin if lstReports.listIndex = -1 then return; endif; strName := lstReports.itemText[lstReports.listIndex]; jrep := myJWRM.getReport(strName); if jrep = null then return; endif; if chkOrientation.value then intOrient := 2; // landscape else intOrient := 1; // portrait endif; intIndex := lstProfiles.listIndex; if lstProfiles.listIndex = -1 and lstProfiles.listCount > 0 then intIndex := 1; endif; if intIndex > 0 then strProfile := lstProfiles.itemText[intIndex]; jrep.setProfile(strProfile); endif; jrep.setPreviewOptions(chkPreview.value, true, false, false, "Printing " & strName); jrep.setPageOptions(Print_A4, intOrient, 1, 0, 0, 10, 10, 0, true, 1); jrep.run; end;