PRINTER
Top  Previous  Next


PRINT reportname ARRANGE clause WHERE clause .. ORDER BY clause .. OPTION PRINTER

PRINT_OPTION_PRINTER

Note: Each additional OPTION parameter must be separated by the pipe | symbol.


OPTION Parameters:

SHOW_CANCEL_DIALOG specifies whether to suppress cancel dialog box during the print process.

Values:
ON (default)  
OFF  

TRAY specifies the name of the bin (paper tray) containing the paper on which the report will be printed. A common use of this property is to set it to Manual Feed on mailing label reports. That way you can provide a means to load the special label paper without manually setting the printer.

COLLATION indicates whether multiple copies will print in pre-sorted order.

Values:
ON  
OFF  

COPIES specifies the number of copies to print. If the Collation property is set to ON, the copies will print in sorted order.

DOCUMENT_NAME When a report is printing, this is the name of the document as it should appear when listed in the Print Manager and on network header pages. This value can also be displayed in reports using the DocumentName type of the SystemVariable component.

DUPLEX This property indicates what type of two-sided printing should occur. Not all printers support duplex printing.

Values:
NONE - Duplex printing is disabled.  
HORIZONTAL - Duplex printing should be performed across the page, from left to right, so the text will read as in a book  
VERTICAL - Duplex printing should be performed down the page, from top to bottom, so the text will read as in tablet  

ORIENTATION The value of the Orientation property determines whether a report prints vertically or horizontally on a page.

Values:
PORTRAIT - The print job prints vertically on the page.  
LANDSCAPE - The print job prints horizontally on the page.  

PAPER_NAME The name of the paper on which the report will be printed. When you specify a value for the PAPER_NAME property, the PaperWidth and PaperHeight are automatically set to the proper values. For example, if Legal is specified, the PAPER_WIDTH will be set to 8.5" and the PAPER_HEIGHT will be set to 14" when ORIENTATION is PORTRAIT (if the ORIENTATION is LANDSCAPE, the values will be reversed).

PAPER_WIDTH The value of the PAPER_WIDTH are always expressed in the units specified by the Report.

PAPER_HEIGHT The value of the PAPER_HEIGHT are always expressed in the units specified by the Report.

PRINTER_NAME The name of the printer that will be used to print the report.

PAGE_SETTINGS specifies the option to print All, First Last or a given number of pages when used in combination with PAGE_LIST and PAGE_LIST_VALUES.

Values:
ALL  
FIRST  
LAST  
PAGE_LIST  
PAGE_LIST_VALUES  

PAGE_LIST specifies the option to print a given number of pages. This option must be used with PAGE_SETTINGS and PAGE_LIST_VALUES. See examples below for more practical use of this option.

PAGE_LIST_VALUES specifies the values for number of pages, such as, 3,5,8 or 3,8 or 3, or 1-3,8 or 3,5,9-15. This option must be used with PAGE_SETTINGS and PAGE_LIST. See examples below for more practical use of this option.


Examples:

Example 01 (To print Customer List on your default Windows printer):

PRINT CustomerList OPTION PRINTER

Example 02 (To print Customer List on your network printer):

PRINT CustomerList +
OPTION PRINTER +
|
COPIES 1 +
|
ORIENTATION PORTRAIT +
|
PRINTER_NAME \\MyServer\hp LaserJet 1320 PCL 6

Example 03 (To print Customer Shipping Labels on your label printer):

LBLPRINT CustShippingLabel WHERE CustID = 127 OPTION PRINTER +
|
COPIES 2 +
|
PRINTER_NAME DYMO LabelWriter 2 +
|
ORIENTATION LANDSCAPE

Example 04 (To print first page of Customer List report only)

PRINT CustomerList OPTION PRINTER|PAGE_SETTINGS FIRST

Example 05 (To print last page of Customer List Report only)

PRINT CustomerList OPTION PRINTER|PAGE_SETTINGS LAST

Example 06 (To PRINT all pages)

PRINT ReportName OPTION PRINTER|PAGE_SETTINGS ALL

Example 07 (To print pages 3, 5, and 8 of your big report)

PRINT ReportName OPTION PRINTER +
|
PAGE_SETTINGS PAGE_LIST +
|
PAGE_LIST_VALUES 3,5,8

Example 08 (To print pages 3 and 8 of your big report)

PRINT ReportName OPTION PRINTER +
|
PAGE_SETTINGS PAGE_LIST +
|
PAGE_LIST_VALUES 3,8

Example 09 (To print page 3 only)

PRINT ReportName OPTION PRINTER +
|
PAGE_SETTINGS PAGE_LIST +
|
PAGE_LIST_VALUES 3


Example 10 (To print pages 1 through 3 and 8 of your big report)

PRINT ReportName OPTION PRINTER +
|PAGE_SETTINGS PAGE_LIST +
|PAGE_LIST_VALUES 1-3,8


Example 11 (To print pages 3, 5, and 9 through 15 of your big report)

PRINT ReportName OPTION PRINTER +
|
PAGE_SETTINGS PAGE_LIST +
|
PAGE_LIST_VALUES 3,5,9-15


For more examples and templates, please refer to R:Docs (version 2.5 or higher).