Features: |
BY statement SUM statement SUMBY statement |
Other features: |
FORMAT statement LABEL statement ODS PDF statement SORT procedure TITLE statement |
Data set: | EXPREV |
options nodate pageno=1 obs=10;
ods html close;
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;
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;
sum price / style(TOTAL) = [background =blue color=white]; sum quantity / style(GRANDTOTAL) = [background =yellow color=red]; sumby sale_type;