Now, the PDF output using ODS + Proc Report, is like this (textalign=r):
Name
100 (100.0)
5 (3,8)
Is there a way that I can align the column like this?
Name
100 (100.0)
5 ( 3.8)
Thanks.
Sandy
Hi:
Is your NAME variable a character variable? And if so, do you have a leading space(s) in front of the 3.8? With the code below, I find that the first 3 obs, that are "padded" or the right number of characters, does work correctly in PDF. But the last obs doesn't look right, even with Courier New font, because the (3.8) isn't as wide as the (100.0).
cynthia
ods _all_ close;
data testit;
infile datalines;
input @1 Name $char11.;
obsnum=_n_;
return;
datalines;
100 (100.0)
5 ( 3.8)
12 (999.9)
15 (3.8)
;
run;
ods pdf file='c:\temp\testits.pdf';
proc report data=testit;
column obsnum Name;
define obsnum / order;
define Name / display
style(column)={just=r font_face='Courier New' font_weight=bold};
run;
ods pdf close;
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.
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.