Chapter Contents

Previous

Next
The REPORT Procedure

Example 6: Displaying Multiple Statistics for One Variable


Procedure features:
PROC REPORT statement options:
LS=
PS=
COLUMN statement:
specifying statistics for stacked variables
DEFINE statement options:
FORMAT=
GROUP
ID
Data set: GROCERY
Formats: $MGRFMT.

The report in this example displays six statistics for the sales for each manager's store. The output is too wide to fit all the columns on one page, so three of the statistics appear on the second page of the report. In order to make it easy to associate the statistics on the second page with their group, the report repeats the values of Manager and Sector on every page of the report.



Program

libname proclib 'SAS-data-library';
options nodate pageno=1 linesize=80 pagesize=60
        fmtsearch=(proclib);
 Note about code
proc report data=grocery nowd headline headskip
            ls=66 ps=18;




 Note about code
column sector manager (Sum Min Max Range Mean Std),sales;
 Note about code
   define manager / group format=$mgrfmt. id;
   define sector / group format=$sctrfmt.;
   define sales / format=dollar11.2 ;
 Note about code
   title 'Sales Statistics for All Sectors';
run;


Output
[HTML Output]  [Listing Output]


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.