Hi,
I often use proc print data procedure to summarize variable like this
proc print data = test.mytest;
sum nb_total Mt_Total_CAD;
run;
How can I set my preference in terms of format?
Here is what I would like the output to look like :
Font: Calibri, 11 pt, no spacing before of after the characters
How do I do that?
Thank you for your help and time
HI, in the PROC PRINT statement you can specify STYLE= overrides to do what you want. The PROC PRINT doc has some good examples. There's a program below to get you started.
cynthia
ods html file='c:\temp\demo1.html' style=sasweb;
ods rtf file='c:\temp\demo1.rtf';
ods pdf file='c:\temp\demo1.pdf';
proc print data=sashelp.class
style(header)={background=purple font_size=11pt}
style(grandtotal)={background=pink color=black font_size=14pt font_face='Calibri'}
style(obs)={background=pink color=black font_size=9pt}
style(obsheader)={background=green font_size=9pt};
title '1a) Proc Print Step';
where age gt 13;
sum height weight;
run;
proc print data=sashelp.class
style(table)={cellpadding=2px}
style(header)={background=purple font_size=11pt}
style(grandtotal)={background=pink color=black font_size=14pt font_face='Calibri'}
style(obs)={background=pink color=black font_size=9pt}
style(obsheader)={background=green font_size=9pt};
title '1b) Proc Print Step';
where age gt 13;
sum height weight;
run;
ods _all_ close;
HI, in the PROC PRINT statement you can specify STYLE= overrides to do what you want. The PROC PRINT doc has some good examples. There's a program below to get you started.
cynthia
ods html file='c:\temp\demo1.html' style=sasweb;
ods rtf file='c:\temp\demo1.rtf';
ods pdf file='c:\temp\demo1.pdf';
proc print data=sashelp.class
style(header)={background=purple font_size=11pt}
style(grandtotal)={background=pink color=black font_size=14pt font_face='Calibri'}
style(obs)={background=pink color=black font_size=9pt}
style(obsheader)={background=green font_size=9pt};
title '1a) Proc Print Step';
where age gt 13;
sum height weight;
run;
proc print data=sashelp.class
style(table)={cellpadding=2px}
style(header)={background=purple font_size=11pt}
style(grandtotal)={background=pink color=black font_size=14pt font_face='Calibri'}
style(obs)={background=pink color=black font_size=9pt}
style(obsheader)={background=green font_size=9pt};
title '1b) Proc Print Step';
where age gt 13;
sum height weight;
run;
ods _all_ close;
Thank you very much for the quick reply. This is exactly what I was looking for.
Where can I find each argument I can put in a proc print statement?
Hi:
In the PROC PRINT documentation. You can use STYLE= overrides on the PROC PRINT statement, the VAR statement, etc. Really good examples in the documentation. And, my SAS Global Forum paper this year (not available yet) will talk about the different elements that you can use and the statements where you can use them.
cynthia
Thank you very much for the precision.
Best regards.
Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.
Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.