Hi SAS Community, I'm generating a PDF report using ODS PDF, and I want to display a heading like:
Early Childhood Education: Laying the Foundation
inside a box frame using ods text.
I tried the following code:
ods pdf file="example.pdf" style=journal;
ods escapechar='^';
ods text="^S={borderwidth=1pt bordercolor=black cellpadding=4pt
font_face='Times New Roman' font_size=12pt just=center} Early Childhood Education: Laying the Foundation";
ods pdf close;
Please help me with this query. Any suggestions or alternate methods are most welcome.
Thanks in advance!
I Want Like
I would recommend using PROC ODSTEXT in place of ODS TEXT as shown below:
ods pdf file="example.pdf" style=journal;
ods escapechar='^';
*ods text="^S={borderwidth=1pt bordercolor=black cellpadding=4pt
font_face='Times New Roman' font_size=12pt just=center} Early Childhood Education: Laying the Foundation";
proc odstext;
p "Early Childhood Education: Laying the Foundation" / style={borderwidth=1pt bordercolor=black cellpadding=4pt
font_face='Times New Roman' font_size=12pt just=center};
run;
ods pdf close;
I would recommend using PROC ODSTEXT in place of ODS TEXT as shown below:
ods pdf file="example.pdf" style=journal;
ods escapechar='^';
*ods text="^S={borderwidth=1pt bordercolor=black cellpadding=4pt
font_face='Times New Roman' font_size=12pt just=center} Early Childhood Education: Laying the Foundation";
proc odstext;
p "Early Childhood Education: Laying the Foundation" / style={borderwidth=1pt bordercolor=black cellpadding=4pt
font_face='Times New Roman' font_size=12pt just=center};
run;
ods pdf close;
Interesting. You also could get job done by ODS TEXT= :
NOTE: Do not split the row within ODS TEXT into two or three lines .
ods pdf file="c:\temp\example.pdf" style=journal startpage=no;
ods escapechar='^';
ods pdf text="^{style [borderbottomwidth=1px borderbottomcolor=black bordertopwidth=1px bordertopcolor=black borderleftwidth=1px borderleftcolor=black borderrightwidth=1px borderrightcolor=black cellpadding=4pt font_face='Times New Roman' font_size=12pt just=center]Early Childhood Education: Laying the Foundation}";
proc report data=sashelp.class nowd;run;
ods pdf close;
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Check out this tutorial series to learn how to build your own steps in SAS Studio.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.