PRINTING Printing is done in xpg by piping the relation data into a predefined external command. You can change the default print command using the printCmd resource or the "-printCmd" command-line switch (see the XPG RESOURCES and CONMMAND-LINE SWITCHES sections). xpg comes with a default external command, named "print.filter", which uses perl and groff to format the data into a decent-looking table. If you do not have perl or groff on your system, either get these free packages from a friendly ftp site, or write your own print filter. The exact description of the data output to the external command is found in the default filter's code. Printing is done by selecting one of the four printing commands in the Print menu (or by using their menu accelerators). The available commands are: All Tuples: Prints the entire relation contents; Selected Tuples: Prints only tuples which are currently selected; Key Tuples: Prints only the key attributes of all tuples of the relation; Selected Key Tuples: Same as the above command, but for selected tuples only. In addition to the tuples themselves, you can print totals for the printed data. Totals are calculated for numeric (int and float) attributes only. Available functions are: Sum, Product, Count, Average, Standard-Deviation, Minimum, and Maximum - similar to the functions found in the Math Dialog (see the MATH OPERATIONS section). You add totals reports by selecting the Options item in the Print menu. This opens a dialog with check-boxes for the above aggregate functions. Just check the desired functions and close the dialog by pressing the "Close" button. Your selection remains in effect, for all printing commands, until the viewer is closed. You can also set these functions to be included in the report by default. See the XPG RESOURCES section for details.