Previous Page | Next Page

The COMPUTAB Procedure

Enhancing the Report

To enhance the appearance of the final report, you can use the following:

  • TITLE and LABEL statements

  • column headings

  • row titles

  • row and column spacing control

  • overlining and underlining

  • formats

The following example enhances the report in the previous example. The enhanced report is shown in Figure 9.7.

The TITLE statement assigns the report title. The column headings in Figure 9.7 (Division A, Division B, and Division C) are assigned in the first COLUMNS statement by "Division" _name_ specification. The second COLUMNS statement assigns the column heading ("All" "Divisions"), sets the spacing (+4), and formats the values in the TOTAL column.

Similarly, the first ROWS statement uses previously assigned variable labels for row labels by specifying the _LABEL_ option. The DUL option in the second ROWS statement double-underlines the INSURE row. The third ROWS statement assigns the row label TOTAL to the SUM row.

title 'Year to Date Expenses';

proc computab cwidth=8 cdec=0;

   columns a  b  c / 'Division' _name_;
   columns total / 'All' 'Divisions' +4 f=dollar10.0;

   rows travel advrtise salary insure / _label_;
   rows insure / dul;
   rows sum / 'Total';

   a = compdiv = 'A';
   b = compdiv = 'B';
   c = compdiv = 'C';

   colblk: total = a + b + c;
   rowblk: sum   = travel + advrtise + salary + insure;
run;

Figure 9.7 Report Produced by PROC COMPUTAB Using Enhancements
Year to Date Expenses

                                 Division  Division  Division           All     
                                        A         B         C     Divisions     
   Travel Expenses within U.S.      18700    211000     12800      $242,500     
   Advertising                      18500    176000     34500      $229,000     
   Permanent Staff Salaries        186000   1270000    201000    $1,657,000     
   Benefits Including Insurance      3900     11100     17500       $32,500     
                                 ========  ========  ========    ==========     
   Total                           227100   1668100    265800    $2,161,000     

Previous Page | Next Page | Top of Page