I'm having an issue with my underlines not fully covering all the text I am trying to underline. The code I am using is:
ods text='^S={font=("Times New Roman",8pt,bold) textdecoration=underline}RECIPIENT DATA';
But the output is showing as this:
We are using SAS 9.4.
Thanks!
That looks to be more the renderer than SAS. What is the output destination? Is it Word (which is notoriously bad at headings and such like since the Navigation object came in).
I'm outputting straight to an adobe acrobat pdf.
Does it work without the BOLD?
I'm thinking that what ever calculates lengths might not quite get the character modification from the BOLD option correct. Try the "Times New Roman Bold" font if you have it available.
Even completely removing the font statement from the style statement doesn't fix it.
Could the regions and proc report directly below it have an impact?
For example this section does the same thing:
ods layout start width=7in height = 11in; ods region x = .25in y = 0in width= 4in height = 4in; ods text = '^S={font=("Times New Roman",8pt,bold) textdecoration=underline}EMPLOYER RENEWAL FORMS'; ods region x = .25in y = .25in width= 4in height = 4in; proc report data=renewal_data&yr.; columns status cnt; define status / display '' style=[cellwidth=2.0in]; define cnt / display '' format=comma9. style=[cellwidth=0.5in]; run;
It worked for me.
Can you pad some characters after it and make underline longer ?
ods pdf file='/folders/myfolders/x.pdf';
ods escapechar='^';
ods text="^S={font=('Times New Roman',8pt,bold) textdecoration=underline}RECIPIENT DATA ^S={color=white}dummy";
proc print data=sashelp.class;run;
ods pdf close;
A customer raised the same problem. I tried TEXTDECORATION = UNDERLINE, but did not work for ODS TEXT for whatever reason.
Only the following PROC ODSTEXT statement gave acceptable results in the PDF document. I also noted that PROC ODSTEXT does not inherit the UserText style elements that ODS TEXT uses.
proc odstext;
p "BUSINESS RULES" /
style=[font_size = 10pt
foreground = black
font_weight = bold
borderbottomcolor = black
borderbottomwidth = 0.1pt
background = white];
run;
/* The next line also needed a top margin to apply line spacing */
ods text = "^S={font_size = 8pt font_style = italic margintopwidth = 8pt}Incidents Reported is based on head office received date.";
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.