Features: |
BY statement PAGEBY statement |
Other features: |
SORT procedure FORMAT statement LABEL statement ODS RTF statement TITLE statement |
Data set: | EXPREV |
options nodate pageno=1 obs=10;
proc sort data=exprev; by sale_type order_date quantity; run;
proc print data=exprev n='Number of observations for the month: ' noobs label;
var quantity cost price;
by sale_type order_date; pageby order_date;
label sale_type='Order Type' order_date='Order Date';
format price dollar7.2 cost dollar7.2; title 'Prices and Cost Grouped by Date and Order Type'; title2 'in USD'; run;
proc options option=bufno define; run;
options nodate pageno=1 linesize=80 pagesize=40 obs=10;
ods rtf file='your_file.rtf' startpage=no;
proc sort data=exprev; by sale_type order_date quantity; run;
proc print data=exprev n='Number of observations for each order type:' noobs label; var quantity cost price; by sale_type order_date; pageby order_date; label sale_type='Order Type' order_date='Order Date'; format price dollar7.2 cost dollar7.2; title 'Price and Cost Grouped by Date and Order Type'; title2 'in USD'; run;
ods rtf close;
proc print data=exprev n='Number of observations for each order type:' noobs label; var quantity cost price; by sale_type order_date; pageby order_date; label sale_type='Order Type' order_date='Order Date'; format price dollar7.2 cost dollar7.2; title 'Price and Cost Grouped by Date and Order Type'; title2 'in USD'; run;
options nodate pageno=1 linesize=80 pagesize=40 obs=10;
ods rtf file='your_file.rtf' startpage=no;
proc sort data=exprev; by sale_type order_date quantity; run;
proc print data=exprev n='Number of observations for the month: ' noobs label style(N) = {background = gray}; var quantity / style(header) = [background = white]; var cost / style(header) = [background = blue foreground = white]; var price / style(header) = [background = gray]; by sale_type order_date; pageby order_date; label sale_type='Order Type' order_date='Order Date'; format price dollar7.2 cost dollar7.2; title 'Prices and Cost Grouped by Date and Order Type'; title2 '*prices in USD'; run;
ods rtf close;
proc print data=exprev n='Number of observations for the month: ' noobs label style(N) = {background = gray}; var quantity / style(header) = [background = white]; var cost / style(header) = [background = blue foreground = white]; var price / style(header) = [background = gray]; by sale_type order_date; pageby order_date; label sale_type='Order Type' order_date='Order Date'; format price dollar7.2 cost dollar7.2; title 'Prices and Cost Grouped by Date and Order Type'; title2 '*prices in USD'; run;