Thank you, Cynthia. It is exactly what I need. I have slightly modified the code and have just a few questions regarding options (it is not working in herein): 1. Is it possible to use condition depending on a variable 'access' that is not printed? Should it be mentioned in 'proc report'. 2. Could you please put a link on useful documentation on 'call define'. What are the options and so on? It seems to me that using of 'compute+rtf language' is much more convenient that any macroses that align by decimal, or draw any lines under values, or hyphen etc.. I can be wrong of course ). data align;
length string $15;
infile datalines dlm=',' dsd;
input name $ string $ access $;
return;
datalines;
Alan, "89", A
Barb, "85 (95.5)", B
Carl, "4 (4.5)", B
Diane, "81 (23.9)", B
Ed,"83 (6.7)", B
Fran, "0", A
Gary,"67", A
;
run;
ods rtf file='C:\temp\test_align.rtf';
ods escapechar = "^";
proc report data=align;
column name string /*access*/;
define name / order display
style(column)={width=2.00in just=c};
define string / display
style(column)={width=2.00in just=c};
/*define access / display style(column)={width=2.00in just=d};*/
compute string;
if access="B" then
call define(_col_,'style',' style=[just=c protectspecialchars=off pretext="\qj\tqdec\tx700 "]');
endcomp;
run;
ods rtf close;
... View more