*DEFPRT (SETMODE)
*DEFPRT={name}
Where:
name
Required. A previously defined Character String Variable or a string Literal specifying a default printer name.
This control allows modification of the runtime’s default printer name.
Default Print Device/File
The PRINT instruction supports a default print device/file name format that allows a Windows print device (9.4C). The default print device/file name can be specified in the runtime screen definition file or it can be set using the SETMODE *DEFPRT keyword. The new device name format that allows the Windows device to be specified is as follows:
Where:
{mode}
Optional - The {mode} can be specified as a single character that is specified as 'A', 'F', 'R', or 'W'. If a {mode} character is specified, the access to the Windows printer device is defined as follows:
W or w - A Window's printer device name is being supplied in {prtname}. This is the default Windows printer device behavior if the {mode} is not specified.
A or a - A Window's printer device name is being supplied in {prtname}. In addition, the device is opened in a manner to allow absolute pass through mode. In this mode, data is passed to the printer device without the data being affected by the operating system.
R or r - A Window's printer device name is being supplied in {prtname}. In addition, the device is opened in raw data output mode. This mode may be used for printer drivers that don't support the absolute pass through mode (A).
F or f - This identifies that PDF output is to be used with the output being written into {prtname} when a PRINT instruction is executed for printing to the default print device.
{prtname}
The {prtname} is required for the 'A', 'R', and' 'W' modes and option for the 'F' mode. The {prtname} is is a current Windows printer device name that has been installed on the system where the runtime is executing. For the 'F' mode, when no print device is detected, a standard file prep dialog is displayed. When an end-user selects a PDF file name, the file is created and output to the file is written in PDF format.
Examples:
Example 1 ( Default Windows print device )
Example 2 ( Default Windows print device using 'R' printer mode )
Example 3 (Default PDF output)
Example 5 (User selected PDF output file)
See Also: List Controls (SETMODE), SETMODE
![]() |