Is there a way to style part of a header a different style than the rest of the header?
In the following example is it possible to have STATS bigger (say 14pt, Arial and bold, not italicized)?
ods pdf file="C:\temp\test.pdf" style=journal;
proc report data=sashelp.class nowd;
column name ('Stats' weight age height);
run;
ods pdf close;
Hi:
There are 2 methods that I'm aware of:
1) change all the HEADERS in the PROC REPORT statement and then override individual headers for selected column in the DEFINE statement or
2) use ODS ESCAPECHAR in the PROC REPORT statement
I'm sort of a control freak, so I tend to use Method 1, but Method 2 is perfectly acceptable too. My only comment is that I don't use Arial (a Microsoft specific font) with PDF. I think that to force PDF to use Arial, you have to specify it as: "Arial Unicode MS", which is way more typing than Helvetica, which seems to be the font that PDF is happiest with.
cynthia
ods listing close;
ods pdf file="C:\temp\test.pdf" style=journal;
proc report data=sashelp.class nowd
style(header)={font_face='Helvetica' font_size=14pt
font_style=roman font_weight=bold};
title 'Method 1';
column name ('Stats' weight age height);
define name / order
style(header)={font_face='Helvetica' font_size=10pt font_weight=bold};
define weight / order
style(header)={font_face='Helvetica' font_size=10pt font_weight=bold};
define age / order
style(header)={font_face='Helvetica' font_size=10pt font_weight=bold};
define height / order
style(header)={font_face='Helvetica' font_size=10pt font_weight=bold};
run;
ods escapechar='~';
proc report data=sashelp.class nowd;
title 'Method 2';
column name ("~{style[font_face='Helvetica' font_size=14pt font_style=roman font_weight=bold]Stats}"
weight age height);
run;
ods pdf close;
Hi:
There are 2 methods that I'm aware of:
1) change all the HEADERS in the PROC REPORT statement and then override individual headers for selected column in the DEFINE statement or
2) use ODS ESCAPECHAR in the PROC REPORT statement
I'm sort of a control freak, so I tend to use Method 1, but Method 2 is perfectly acceptable too. My only comment is that I don't use Arial (a Microsoft specific font) with PDF. I think that to force PDF to use Arial, you have to specify it as: "Arial Unicode MS", which is way more typing than Helvetica, which seems to be the font that PDF is happiest with.
cynthia
ods listing close;
ods pdf file="C:\temp\test.pdf" style=journal;
proc report data=sashelp.class nowd
style(header)={font_face='Helvetica' font_size=14pt
font_style=roman font_weight=bold};
title 'Method 1';
column name ('Stats' weight age height);
define name / order
style(header)={font_face='Helvetica' font_size=10pt font_weight=bold};
define weight / order
style(header)={font_face='Helvetica' font_size=10pt font_weight=bold};
define age / order
style(header)={font_face='Helvetica' font_size=10pt font_weight=bold};
define height / order
style(header)={font_face='Helvetica' font_size=10pt font_weight=bold};
run;
ods escapechar='~';
proc report data=sashelp.class nowd;
title 'Method 2';
column name ("~{style[font_face='Helvetica' font_size=14pt font_style=roman font_weight=bold]Stats}"
weight age height);
run;
ods pdf close;
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.