This is possible through programmable configuration. We need to set the relevant environment variables prior to printing the Report.
For example
, preprinted Invoice can be printed in a Dot Matrix Printer and other re
ports can be printed in Laser Jet Printer.
● Variable SVPrinterName is the variable which accepts the Printer Name and the content is redirected to the relevant printer.
● Variable SVPreview is the variable which accepts a logical value denoting whether to display a print preview or not.
●
Once the Variables required for Printing are preset, there is no need to bring up the configuration
screen for the user. Hence, we need to add a logical value Yes subsequent to the Report Name which will skip the Configuration window.
Similarly, all other configuration variables for various actions need to be identified and preset prior to the necessary action.
Syntax:
ACTION : <Report Name> : <Logical Value>
Where,
ACTION
can be either
PRINT, MAIL, UPLOAD, EXPORT, PRINT REPORT, MAIL REPORT, UPLOAD REPORT or EXPORT REPORT.
Report Name
can be a Report to be rendered. If the Report Name is the current Report, then . (dot) can be used only for Report Specific actions
Logical Value
if enabled, configuration window will not appear to the user else will appear
Below is a sample code snippet to print Trial Balance in HP Universal Printing PCL 6 with Preview enabled:
[Function: Smp TB Print Config]
Variable : DSPShowClosing : Logical
00 : SET : SVPrinterName : "HP Universal Printing PCL 6"
05 : SET : SVPreview : No
06 : SET : DSPShowClosing : Yes
10 : Print : Trial Balance : Yes
Similarly, if the current Report needs to be printed, one needs to use the action Print Report and in the place of Report Name, one can use a dot (.).
That is, in the above code, Label 10 can be rewritten as
10 : PRINT REPORT : . : Yes