Important: This function only concerns Crystal Reports reports.
This function is used to set permanently or for the current session the following print parameters for the PrinterNum printer number:
Orientation,
Paper size,
Tray selection,
Duplex mode,
Number of copies (not managed by the print configuration file),
Copy collation (not managed by the print configuration file).
Context
Windows client,
Adelia Cloud client,
Event Adelia client.
Parameters
NUM_BIN_2 |
PrinterNum |
Number of the printer (from 1 to 9). |
BOOL |
Permanent |
Specifies whether or not the new parameters are taken into account for the current session only (*FALSE) or permanently (*TRUE) (the configuration file will be modified). |
NUM_BIN_2 |
Orientation |
1 = Portrait, 2 = Landscape. |
NUM_BIN_2 |
PaperSize |
Indicates the size of the paper used for the print job. Important: Some parameters may not be valid, depending on the printer used. |
NUM_BIN_2 |
Tray |
Indicates the printer's paper feed source. Important: Some parameters may not be valid, depending on the printer used. |
NUM_BIN_2 |
Duplex |
1=None, 2=Long side, 3=Short side. |
NUM_BIN_4 |
NbCopies |
Number of copies to be printed |
NUM_BIN_2 |
Collate |
Used to collate the printed copies of the documents. 0=Copies not collated, 1=Copies collated. |
BOOL |
ReturnCode |
Return code for the operation: *TRUE if the operation was successful. *FALSE if the operation failed. |
Note: The parameters the default value of which is not to be modified (value defined in the configuration file) must be set to –1.
Example
PrinterNum Permanent Orientation PaperSize Tray Duplex NbCopies Collate |
= 1 = *FALSE = 1 = 9 = -1 = 2 = 1 = 0 |
*sets the parameters for the session (lifetime of the process) *Portrait *A4 *default value defined in the configuration file *Two-sided printing relative to the long side *1 copy only |
CALL_DLL 'VATOOLBX.DLL' 'VaToolBxSetPrinterEx' PrinterNum Permanent Orientation PaperSize Tray Duplex NbCopies Collate ReturnCode
List of the VaToolBx functions by topic