📖HomeBack The Print Method on a Crystal report can be called using logic in the same way as any other method. The key for server-side printing is to ensure that the Printing user has been configured in the Server Configuration. The Printing user allows the ClearSCADA server to logon to the operating system as a particular user and use the print settings of that user. Without this, ClearSCADA could not print at all, as print settings are user specific, and ClearSCADA runs under the SYSTEM account. Further detail on this can be found in the online help.
The simplest way to verify that the printing user has been configured correctly is to right click on the report object and manually select the Print option. If the report prints correctly, the printing user has been configured without error.
Three parameters are expected by the Print method:
The name of the printer (as defined in the Printers section in the control panel)
The number of copies
Whether the copies are collated
Some example ST code for calling the Print method is shown below:
PROGRAM PrintReportMETHOD Print AT %M(NameOfReport.Print) : STRING, INT, BOOL;END_METHODPrint('NameOfPrinter',1,FALSE);END_PROGRAM