Procedure features: |
COLUMN
statement:
|
COMPUTE statement arguments:
|
DEFINE statement options:
| ANALYSIS |
| MAX |
| MIN |
| NOPRINT |
| customizing column
headers | |
LINE statement:
| pointer controls |
| quoted text |
| repeating a character string |
| variable values and
formats |
| writing a blank line | |
|
Other features: |
automatic macro variables:
|
|
Data set: |
GROCERY
|
Formats: |
$MGRFMT. and $DEPTFMT.
|
The customized summary at the end of this report
displays the minimum
and maximum values of Sales over all departments for stores in the southeast
sector. To determine these values, PROC REPORT needs the MIN and MAX statistic
for Sales in every row of the report. However, to keep the report simple,
the display of these statistics is suppressed.
libname proclib 'SAS-data-library';
options nodate pageno=1 linesize=64 pagesize=60
fmtsearch=(proclib);
| proc report data=grocery nowd headline headskip; |
| column manager department sales
sales=salesmin
sales=salesmax; |
| define manager / order
order=formatted
format=$mgrfmt.
'Manager';
define department / order
order=internal
format=$deptfmt.
'Department'; |
| define sales / analysis sum format=dollar7.2 'Sales'; |
| define salesmin / analysis min noprint;
define salesmax / analysis max noprint; |
| compute after;
line ' ';
line @7 53*'-'; |
| line @7 '| Departmental sales ranged from'
salesmin dollar7.2 +1 'to' +1 salesmax dollar7.2
'. |';
line @7 53*'-'; |
| endcomp; |
| where sector='se';
title 'Sales for the Southeast Sector';
title2 "for &sysdate";
run; |
Sales for the Southeast Sector 1
for 27MAY98
Manager Department Sales
----------------------------
Jones Paper $40.00
Canned $220.00
Meat/Dairy $300.00
Produce $70.00
Smith Paper $50.00
Canned $120.00
Meat/Dairy $100.00
Produce $80.00
-----------------------------------------------------
| Departmental sales ranged from $40.00 to $300.00. |
----------------------------------------------------- |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.