Procedure features: |
BREAK statement options:
|
OL |
|
SKIP |
|
SUMMARIZE |
|
SUPPRESS | |
CALL DEFINE
statement |
Compute block
|
associated with a data set variable | |
COMPUTE statement arguments:
|
AFTER |
|
a data set variable as report-item | |
DEFINE statement options:
|
ANALYSIS |
|
GROUP |
|
SUM |
|
customizing column headings | |
LINE
statement:
|
quoted text |
|
variable values | |
|
Data set: |
GROCERY
|
Formats: |
$MGRFMT. and $DEPTFMT.
|
This example creates a summary report that
-
consolidates information for each combination of Sector and Manager
into one row of the report
-
contains default summaries of sales for each sector
-
contains a customized summary of sales for all
sectors
-
uses one format for sales in detail rows and a different format
in summary rows
-
uses customized column headings.
|
libname proclib 'SAS-library'; |
|
options nodate pageno=1 linesize=64 pagesize=60
fmtsearch=(proclib); |
|
proc report data=grocery nowd headline headskip; |
|
column sector manager sales; |
|
define sector / group
format=$sctrfmt.
'Sector';
define manager / group
format=$mgrfmt.
'Manager';
define sales / analysis sum
format=comma10.2
'Sales'; |
|
break after sector / ol
summarize
suppress
skip; |
|
compute after;
line 'Combined sales for the northern sectors were '
sales.sum dollar9.2 '.';
endcomp; |
|
compute sales;
if _break_ ne ' ' then
call define(_col_,"format","dollar11.2");
endcomp; |
|
where sector contains 'n'; |
|
title 'Sales Figures for Northern Sectors';
run; |
Sales Figures for Northern Sectors 1
Sector Manager Sales
------------------------------
Northeast Alomar 786.00
Andrews 1,045.00
----------
$1,831.00
Northwest Brown 598.00
Pelfrey 746.00
Reveiz 1,110.00
----------
$2,454.00
Combined sales for the northern sectors were $4,285.00.
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.