You can decimal-align values for the Listing, HTML, and PDF destinations by using a PICTURE format.
Beginning with SAS® 9.1, use the JUST=D to decimal-align for ODS RTF and PDF.
Here are examples of using the PICTURE format and JUST=D:
/* Example using the PICTURE format */
PROC FORMAT;
PICTURE twodec LOW-HIGH=' 99.99';
PICTURE onedec LOW-HIGH=' 99.9 ';
PICTURE nodec LOW-HIGH='009 ';
RUN;
DATA new;
INPUT type $ value;
DATALINES;
x 33.33
y 44.4
z 555
;
RUN;
ODS HTML FILE='myfile.htm';
ODS PDF FILE='myfile.pdf';
PROC REPORT NOWD DATA= new;
DEFINE value / STYLE(COLUMN)=[ASIS=ON];
COMPUTE value;
IF type='x' THEN CALL DEFINE('value.sum','FORMAT','twodec.');
IF type='y' THEN CALL DEFINE('value.sum','FORMAT','onedec.');
IF type='z' THEN CALL DEFINE('value.sum','FORMAT','nodec.');
ENDCOMP;
RUN;
ODS _ALL_ CLOSE;
/* Example using JUST = D */
ODS RTF FILE='myfile.rtf';
ODS PDF FILE='myfile2.pdf';
PROC REPORT NOWD DATA= new;
DEFINE value / STYLE(COLUMN)=[JUST=d];
RUN;
ODS _ALL_ CLOSE;