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;
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.