Printer

Description

The name of the printer for printing the DataWindow as specified in the system’s printer selection dialog box.

Applies to

DataWindows

Syntax

PowerBuilder dot notation:

dw_control.Object.DataWindow.Printer = "printername"

Describe and Modify argument:

"DataWindow.Printer" { = printername }"

Parameter

Description

printername

Name of the printer you want to use for your DataWindow

Usage

The printer you select for a DataWindow does not affect the PowerBuilder default printer or the system default printer. To specify a network-connected printer, you must use a fully specified network printer name:

dw1.Object.DataWindow.Printer = "\\net-print\pr-6"

If you specify a DataWindow printer, but the printer is not found, the DataWindow engine does not attempt to print to a default device.

Examples

Example 1

The following example changes the DataWindow printer (but does not affect the system default printer device):

dw1.Modify ('DataWindow.Printer="My LaserJet 3" ')

Example 2

You can display the DataWindow printer with either of the following calls:

string ls_dwprinter

ls_dwprinter = dw1.Object.DataWindow.Printer

ls_dwprinter = dw1.Describe("DataWindow.Printer")