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
SAS Super FREQ
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

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 1507 views
  • 0 likes
  • 4 in conversation