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;
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
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.
Ready to level-up your skills? Choose your own adventure.