The SAS Output Delivery System and reporting techniques

ODS PDF text with frame

Reply
N/A
Posts: 0

ODS PDF text with frame

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?
SAS Employee
Posts: 50

Re: ODS PDF text with frame

Posted in reply to deleted_user
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
Contributor
Posts: 24

Re: ODS PDF text with frame

Posted in reply to ScottH_SAS
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)
SAS Super FREQ
Posts: 8,864

Re: ODS PDF text with frame

Posted in reply to deleted_user
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
Ask a Question
Discussion stats
  • 3 replies
  • 361 views
  • 0 likes
  • 4 in conversation