Understanding Printer-Independent Reports

To create a printer-independent report, you must write a program that avoids using any characteristics that are unique to a specific printer. Although complete printer independence may be too restrictive, make your report as printer-independent as you can by following these guidelines:

  • Ensure that your program is free of the following commands:

    • GRAPHIC FONT (use ALTER-PRINTER instead).

    • PRINTER-INIT, PRINTER-DEINIT, and USE-PRINTER-TYPE (except for using this command to select a printer at runtime, as demonstrated in the sample program that follows).

    • CODE-PRINTER and CODE qualifiers of the PRINT command.

    • DECLARE-PRINTER and PRINT-DIRECT.

    • The SYMBOL-SET argument of the ALTER-PRINTER command.

  • Ensure that the report is readable if printed on a line printer. Graphics or solid lines printed with the graphic command are not printed on a line printer. Test your graphical report on a line printer.

  • Use only a small set of fonts. Font numbers 3, 4, and 5 and their boldface versions are the same regardless of the type of printer that you use (except for a line printer). Font 3 is Courier, font 4 is Helvetica, and font 5 is Times Roman. Note that on some HP printers, Helvetica may not be available, which would reduce the common fonts to fonts 3 and 5 only.

  • Be aware of certain limitations. EPS-file images can be printed only on PostScript printers. HPGL-file images can be printed only on HP LaserJet Series 3 or higher or printers that emulate HP PCL at that level. BMP-file images can be printed using Microsoft Windows only. GIF-file and JPEG-file images are suitable only for HTML output. PRINT-IMAGE and PRINT-CHART may not work with old printers that use PostScript Level 1 or HP LaserJet Series II.

If your report is printer-neutral and does not specify a printer, you can specify the printer at runtime in two ways.

The first method is to use the -PRINTER:xx command-line flag, which specifies the output type for your report. Use the following commands:

  • -PRINTER:LP for line-printer output.

  • -PRINTER:PS for PostScript output.

  • -PRINTER:HP for HP LaserJet output.

  • -PRINTER:WP for Microsoft Windows output.

  • -PRINTER:HT for HTML output.

If you are using the system shell, enter this command in the command line:

sqr test username/password -printer:ps

Note: Currently, PRINTER:WP sends output to the default Microsoft Windows printer. To specify a non-default Microsoft Windows printer, enter the following command: -PRINTER:WP:{Printer Name}. The {Printer Name} is the name assigned to your printer. For example, to send output to a Microsoft Windows printer named NewPrinter, you would use -PRINTER:WP:NewPrinter. If your printer name has spaces, enclose the entire command in double quotes.

The second method of specifying the printer type is by using the USE-PRINTER-TYPE command.

See SQR for PeopleSoft Implementation.