How to dynamically change the printer tray when printing a document
The version EDT.208 of the Crystal reports wrapper is compatible with V7 and higher. It has a new feature that enables a dynamic selection of the paper source for the printer.
The wrapper is now able to scan the printed document and perform certain operations depending on the scanning result.
To enable scanning, a parameter must be added in the Crystal Report definition with the special name __x3opt__
.
This parameter does not have to be available in the parameter dictionary of Sage X3 (it is an internal parameter on the .rpt report file definition only).
Then, the option tray
(the only one supported from now) must be added in the report with the following format:
__x3opt param1:value1; param2:value2; ...__
(__
being a double underscore)
This means that enabling a tray change is done by adding a text field with the value __x3opt tray:2__
to force printing the page using tray '2' of the printer.
Because the field is evaluated when the scanning is done, a formula field can also be used to select the tray depending on specific business rules.