Customizing Printed Report Output

The PeopleSoft application supports batch printing BI Publisher reports directly from a server using PDF output format. Printers with Postscript level 3 interpreter natively support printing PDF format. You can also print to PCL and Postscript printers by specifying the type of printer in the ReportDefn.SetPrinterType() class method. The PeopleSoft application provides PeopleCode support for sending PDF files directly to a specified printer, and it also provides customization capability for inserting conversion logic from PDF to different printer formats.

To send a BI Publisher report to a printer and to specify a printer type, use the PrintOutput and the SetPrinterType methods after the ProcessReport method as shown in this example:

&MyReportDefn.ProcessReport("myTemplate", "", %Date, "PDF");
&MyReportDefn.SetPrinterType("PCL" or "PS")
&MyReportDefn.PrintOutput(&PrinterPath);

If you want to insert conversion logic from PDF to a different printer format (other than PCL and PS) before an output file is sent to a printer, create a batch file named psxprint.bat on Microsoft Windows or psxprint.sh on Unix under the Process Scheduler server home directory %PS_HOME%\appserv\prcs\%domain_name% and write a call to an external conversion program in this batch file.

In the batch file, you can use the following variables, which the ReportDefn.PrintOutput() method replaces with actual data at report runtime:

Variable Description
%RPTOUTDIR%

Full path to the report output directory.

%REPORTFILE%

Full path to the report output file.

%DESTPRINTER%

Full path to the destination printer.

See Setting Output Options.