BookmarkSubscribeRSS Feed
deleted_user
Not applicable
How does one put a frame around text outputted to pdf ie. create a textbox. Have tried:

ods pdf text='^S={just=left borderwidth=1pt font=("times new roman",12pt,Bold)} Total Pay: € &Perc';

but isn't working. Also the call function &Perc doesn't seem to work here is there any way I can call an assigned figure into this statement?
3 REPLIES 3
ScottH_SAS
SAS Employee
If you are using 9.2 you can use individual border control. You have two options...

(1) use inline styles like this :

ods pdf text = '^{style [bordertopcolor=black bordertopwidth=1pt ] text statement}';

or

(2) use proc template :

proc template;
define style mystyle;
parent=styles.Printer;
style usertext from usertext /
bordertopcolor=red
bordertopwidth=0.5pt
;
end;
run;

Scott
JenHarper
Calcite | Level 5
Do we have to specify each border? I'm actually trying to HIDE the border, but same idea. I wanted to override the default border that is showing up. I was hoping I could just do "bodercolor=white" to hide it, but I had to set all four sides to white instead. Is there something in my code or do we have to specify all 4?

(Using 9.2p2 style=normal on Win Server)
Cynthia_sas
Diamond | Level 26
Hi:
When you say "call function", I assume you mean your macro variable reference &Perc????

The reason it does not resolve is that you have your string in SINGLE quotes and macro variable references will not resolve in single quotes.

Try "flipping" the quotes:
[pre]
ods pdf text="^S={just=left borderwidth=1pt font=('times new roman',12pt,Bold)} Total Pay: € &Perc";
[/pre]

and you should get resolution of &Perc (if it has been set with either a %LET or a CALL SYMPUT or some other technique).

cynthia

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
  • 3 replies
  • 2204 views
  • 0 likes
  • 4 in conversation