Features: |
PROC REPORT statement options: SPLIT= BREAK statement options: SKIP COLUMN statement: stacking variables
LINE statement: pointer controls |
Data set: | GROCERY |
Formats: | $SCTRFMT |
libname proclib
'SAS-library';
options fmtsearch=(proclib);
proc report data=grocery nowd headline headskip split='*';
column sector manager department,sales perish;
define sector / group format=$sctrfmt. 'Sector' ''; define manager / group format=$mgrfmt. 'Manager* ';
define department / across format=$deptfmt. '_Department_';
define sales / analysis sum format=dollar11.2 ' ';
define perish / computed format=dollar11.2 'Perishable*Total';
break after manager / skip;
compute perish; perish=sum(_c3_, _c4_); endcomp;
compute after; line @4 57*'-'; line @4 '| Combined sales for meat and dairy : ' @46 _c3_ dollar11.2 ' |'; line @4 '| Combined sales for produce : ' @46 _c4_ dollar11.2 ' |'; line @4 '|' @60 '|'; line @4 '| Combined sales for all perishables: ' @46 _c5_ dollar11.2 ' |'; line @4 57*'-'; endcomp;
where sector contains 'n' and (department='p1' or department='p2');
title 'Sales Figures for Perishables in Northern Sectors'; run;
define sector / group format=$sctrfmt. 'Sector' ''; define manager / group format=$mgrfmt. 'Manager* ';