![]() Chapter Contents |
![]() Previous |
![]() Next |
| The REPORT Procedure |
| Procedure features: |
| ||||||||||||||||||||||||||
| Data set: | GROCERY | ||||||||||||||||||||||||||
| Formats: | $SCTRFMT., $MGRFMT., and $DEPTFMT. |
| Program |
libname proclib 'SAS-data-library';
options nodate pageno=1 linesize=64 pagesize=60
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=_c3_+_c4_;
endcomp; |
| | where sector contains 'n'
and (department='p1' or department='p2');
title "Sales Figures for Perishables in Northern Sectors";
run; |
| Output |
Sales Figures for Perishables in Northern Sectors 1
_______Department_______
Sector Manager Meat/Dairy Produce Perishable
Total
---------------------------------------------------------
Northeast Alomar $190.00 $86.00 $276.00
Andrews $300.00 $125.00 $425.00
Northwest Brown $250.00 $73.00 $323.00
Pelfrey $205.00 $76.00 $281.00
Reveiz $600.00 $30.00 $630.00
---------------------------------------------------------
| Combined sales for meat and dairy : $1,545.00 |
| Combined sales for produce : $390.00 |
| |
| Combined sales for all perishables: $1,935.00 |
--------------------------------------------------------- |
![]() Chapter Contents |
![]() Previous |
![]() Next |
![]() Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.