The PRINT Procedure |
Features: |
| |||||
Other features: |
| |||||
Data set: | EXPREV |
This example
creates a separate section of the report for each combination of sale type and sale date
sums quantities and retail prices only for each sale type and for all sale types, not for individual dates.
Program: Creating a Listing Report |
options nodate pageno=1 linesize=80 pagesize=40 obs=10; |
proc sort data=exprev; by sale_type order_date; run; |
proc print data=exprev noobs sumlabel; |
by sale_type order_date; sum price quantity; sumby sale_type; |
label sale_type='Sale Type' order_date='Sale Date'; |
format price dollar10.2 cost dollar10.2; title 'Retail and Quantity Totals for Each Sale Type'; run; |
Output: Listing |
Limiting the Number of Sums in a Report: Listing Output
Program: Creating a PDF file |
options nodate pageno=1 linesize=80 pagesize=40 obs=10;
ods pdf file='your_file.pdf'; |
proc sort data=exprev; by sale_type order_date; run;
proc print data=exprev noobs sumlabel;
by sale_type order_date; sum price quantity; sumby sale_type;
label sale_type='Sale Type' order_date='Sale Date';
format price dollar10.2 cost dollar10.2; title 'Retail and Quantity Totals for Each Sale Type'; run;
ods pdf close; |
Output: PDF |
Limiting the Number of Sums in a Report: PDF Output
Program: Creating a PDF Report with the STYLE Option |
options nodate pageno=1 linesize=80 pagesize=40 obs=10;
ods pdf file='your_file.pdf';
proc sort data=exprev; by sale_type order_date; run;
proc print data=exprev noobs;
by sale_type order_date;
sum price / style(TOTAL) = [background =blue color=white]; sum quantity / style(GRANDTOTAL) = [background =yellow color=red]; sumby sale_type; |
label sale_type='Sale Type' order_date='Sale Date';
format price dollar10.2 cost dollar10.2; title 'Retail and Quantity Totals for Each Sale Type'; run;
ods pdf close;
Output: PDF with Styles |
Limiting the Number of Sums in a Report: PostScript Output Using Styles
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.