BookmarkSubscribeRSS Feed
SachinRuk
Calcite | Level 5
Hi,

I have the following piece of code.

ods pdf text="~S={just=left cellwidth=1.6in background=CX4D7EBF foreground=black} ~mName:
~S={background=white foreground=black} Sachin";


I want to have a blue box around the "Name" part and no background on the "Sachin" part. I also need this to be in one line.

How would you go about doing this.

Thanks in advance,
Sachin
1 REPLY 1
Andre
Obsidian | Level 7
Sachin,
It seems that the ods pdf destination did not accept those specification
which is more adapted to html and by extension to rtf

Andre
Play further with

[pre]
ods escapechar="~";
ods listing close;
ods html file="d:\temp\encadre.htm";
ods rtf file="d:\temp\encadre.rtf";
ods pdf file="d:\temp\encadre.pdf";
proc print data=sashelp.class;run;
*ods pdf text="~S={just=left cellwidth=1.6in background=CX4D7EBF foreground=black} ~mName:
~S={background=white foreground=black} Sachin" ;
ods text="~S={bordercolor=black borderwidth=0.1in just=left cellwidth=1.6in cellheight=0.5in foreground=black} Name:
~S={bordercolor=black} Sachin"; run;
ods text="~{style[bordercolor=black frame=box rules=all borderwidth=0.3in just=left cellwidth=1.6in foreground=black] Name:}
~{style[bordercolor=black background=gray foreground=black] Sachin}";
run;
quit;
ods _all_ close;
ods listing;
[/pre]

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 1201 views
  • 0 likes
  • 2 in conversation