The Printer Object
The printer object has the following common properties and methods:
The color property determines whether the default output should be color, greyscale, plain monochrome, or default (the printer driver's default). If you do not have a color printer attached, colors will be evaluated and printed to greyscale.
The copies property lets you set the number of copies to print.
The duplex property is used to determine whether to print in duplex mode for printers that support this option.
The orientation property is used to determine whether a report should print in portrait, or landscape mode.
The paperSize property allows you to set the paper size for the report. It uses a numeric scheme that varies based on the printer driver. Some printers support paper sizes that others do not.
For printers that support this option, the paperSource property allows you to determine which tray, or bin, the paper will come from. You should be able to change the paperSource on the fly, which might prove useful should you wish to print company letterhead on a report’s cover page only.
The printerName property stores the name of the printer. This is blank by default, which means the default printer in your Windows setup will be used. In most cases you should not set this property. Among other things, the printerName property will be saved in the report's source code, which might cause problems should you attempt to render the report on a computer that does not have this printer available.
The printerSource property determines which printerName should be used. For the reason stated above (see printerName), using the choosePrinter( ) method is recommended.
The resolution property allows you to set the resolution for your report's output. This might prove useful if you were using a dot matrix printer to test your report. Since high resolution output on these printers is usually tediously slow, you could drop the resolution to low when testing, and only use high resolution for the final output.
The trueTypeFonts property can be used to determine how the printer will handle TrueType fonts. For the most part it is probably safest to leave this alone.
The choosePrinter( ) method can be used to ask the user how to print this report. As stated previously, using the choosePrinter dialog from the current report will not affect all reports generated from an application, as would be the case if you used _app.Printer.choosePrinter( ).
Calling the _app object's choosePrinter( ) method
_app.choosePrinter( )
sets the printer for you whole application.
Calling the report object's choosePrinter( ) method
report.printer's choosePrinter( )
allows you to set the printer for the current report. This could be useful in a networked office where several printers are available. Each user could designate a printer where their report should be sent.