Example: Marketing wants a count of the total number of customers with outstanding payments included in the summary of its outstanding invoices report.
To get this record count and print it as part of the report summary, the following is coded.
The following figure shows the trailer containing the record count.
Explanation: Since each record in the report represents an individual customer, coding the COUNT entry in the TRAILER1 will provide the total number of customers with outstanding payments. This TRAILER1 produces a report trailer, or summary, that constitutes the final page of a report. It will print on the 21st line of the page (20/) and begin printing the literal string 'NUMBER OF CUSTOMERS WITH OUTSTANDING PAYMENTS: ' in column 40.