HP OpenVMS Systems Documentation |
HP COBOL
|
Previous | Contents | Index |
There are three Hewlett-Packard COBOL programming capabilities for producing formatted reports: conventional, linage file, and Report Writer. This chapter presents the following topics to help you format and produce reports:
The design of a report is dictated by the data you must include in the report. If you have a general idea of what the report is to contain, you can produce a rough outline using a report layout worksheet.
To create the worksheet, either use an online text editor or draw a layout worksheet like the one displayed in Figure 10-1.
Figure 10-1 Sample Layout Worksheet
The layout worksheet in Figure 10-1 has 132 characters on a line and 60 lines on a page. When you outline your worksheet, include specifics such as page headings, rows and columns, and column sizes.
Section 10.2 describes other report components that you must plan for
when you design a report. Note that you can use your worksheet later
when you write the HP COBOL program that produces the report.
10.2 Components of a Report
There are seven components of a report. Example 10-1 illustrates them.
Example 10-1 Components of a Report |
---|
(1) ********************** COMPANY CONFIDENTIAL ********************** ********************** COMPANY CONFIDENTIAL ********************** ********************** COMPANY CONFIDENTIAL ********************** ****************** * * * YEAR TO DATE * * SALES REPORT * * * ****************** FOR INTERNAL USE ONLY DO NOT COPY FOR SECURITY CLEARANCE LEVELS 1, 2, AND 3 ********************** COMPANY CONFIDENTIAL ********************** ********************** COMPANY CONFIDENTIAL ********************** (1) ********************** COMPANY CONFIDENTIAL ********************** . . . (2) 04-NOVEMBER-96 Year To Date Sales Report Page 1 Salesman Salary/Bonus Client Name Client Address Total Sales (3) ************************ JANUARY REPORT ************************** (4) SMITH $30,000.00 STREN 2742 NORTH ST. $225,000.00 JOHN $10,000.00 TOM MANCHESTER, NH . . . . . . . . . . (4) . . . . . (5) TOTAL JANUARY SALES: $ 2,000,000.00 ****************************************************************** ************************ FEBRUARY REPORT ************************* . . . . . . . . . . . . . . . (6) ********************** COMPANY CONFIDENTIAL ********************** ********************** COMPANY CONFIDENTIAL ********************** ********************** COMPANY CONFIDENTIAL ********************** (6) <<<<<<<<<<<<<<<<<<<<<<<CONTINUED ON NEXT PAGE>>>>>>>>>>>>>>>>>>>>> . . . 04-NOVEMBER-96 Year To Date Sales Report Page 1324 (7) ********************** COMPANY CONFIDENTIAL ********************** ********************** COMPANY CONFIDENTIAL ********************** ********************** COMPANY CONFIDENTIAL ********************** ****************** * * * END OF * * YEAR TO DATE * * SALES REPORT * * * ****************** Total Records: 123456 Total Salesmen: 6754 Total Sales: $123,456,789.99 Total Salaries: $ 9,876,543.21 Total Bonus: $ 6,789,012.34 Total Report Pages: 1324 ********************** COMPANY CONFIDENTIAL ********************** ********************** COMPANY CONFIDENTIAL ********************** (7) ********************** COMPANY CONFIDENTIAL ********************** |
The numbers in the following list correspond to the circled numbers in Example 10-1:
Your program can report three types of totals in the control footings and report footings of your report:
Figure 10-2 Subtotals, Crossfoot Totals, and Rolled Forward Totals
Previous | Next | Contents | Index |