Creating Tabular Reports |
Formatting the
Table![]() ![]() |
The final enhancement to make to your table is to specify the width of
all table cells and the format for summary values in the table cells.
Look at the example below. Notice that the default format for table cells is 12.2. Two decimal places are displayed. |
WalkJogRun | Swim |
Sum | Sum |
2009.00 | 1104.00 |
With many other procedures, you can use the FORMAT statement to assign SAS formats to values. But with PROC TABULATE, the FORMAT statement assigns only user-defined formats to class variable values, as in the table below. The FORMAT statement has no effect on the summary values in tables created by PROC TABULATE. |
ActLevel | ||
High | Low | Moderate |
N | N | N |
7 | 7 | 7 |
To specify a new format for all table cells, use the
FORMAT= option in the PROC TABULATE statement.
proc tabulate data=clinic.admit format=6.; class actlevel; var fee; table actlevel all,fee; run; The FORMAT= option controls
In the FORMAT= option, you can specify any SAS or user-defined numeric format. Specifying FORMAT=6., for example, produces a table with cells formatted as shown below.
proc tabulate data=report.diabetes format=6.; |
Type | Referral | |||
I | II | DR | FM | SF |
N | N | N | N | N |
3 | 17 | 10 | 5 | 5 |
![]() ![]() ![]() ![]() ![]() ![]() |
|
![]() |
![]() |
Copyright © 2002 SAS Institute Inc.,
Cary, NC, USA. All rights reserved.