I have two questions. Using SAS 9.4 on Windows here. First I have a very short program which prints out a table which is almost correct. I would like the top left cell to not have a top line drawn. I suspect there might be a way to have a fake no print column as first column and control printing for various cells based on its value but I have not figured out how to do this. Second, I had trouble drawing borders. Some of these borders did NOT draw when I set border color to black, but worked fine when I used orange. This seems like a bug, but perhaps I am misunderstanding what is happening. I have included bogus data and all code necessary to draw table. I hope someone who has worked with PROC Report for years might be able to enlighten me. This is the first time I have used it. (Edited, added macro for bcolor to assist in testing different border colors. Also included output files for bcolor=red, orange, and black. Perhaps it is a defective version of Microsoft Word which is making it look like the borders are not there for the black version?) DATA RTF_EXAMPLE3; INPUT Parameter ERI CombFlc a1M b2M crp plr albumin il6; CARDS; 1 1 .6 .7 .3 .4 .1 .2 .3 2 .3 1 .6 .7 .3 .4 .1 .2 3 .2 .3 1 .6 .7 .3 .4 .1 4 .1 .2 .3 1 .6 .7 .3 .4 5 .4 .1 .2 .3 1 .6 .7 .3 6 .3 .4 .1 .2 .3 1 .6 .7 7 .7 .3 .4 .1 .2 .3 1 .6 8 .6 .7 .3 .4 .1 .2 .3 1 RUN; proc format; value cp 1='ERI' 2='Combined FLC' 3="~{unicode 03B1}1M" 4="~{unicode 03B2}2M" 5='cpr' 6='PRL' 7='albumin' 8='IL-6'; run; %LET bcolor=red; ODS HTML CLOSE; ODS ESCAPECHAR='~'; ods rtf file="Y:\Users\Slavik\rptbss3.rtf" columns=1; proc report nowindows data=RTF_EXAMPLE3 style(report)=[rules=none frame=void] style(header)=[just=center font_weight=bold background=white borderbottomcolor=&bcolor bordertopcolor=&bcolor borderrightcolor=&bcolor protectspecialchars=off]; /* column Parameter eri ("Middle Molecules~{super 2} \brdrl\brdrs\brdrw10\brsp0 \brdrt\brdrs\brsp0 \brdrr\brdrs\brsp0" combFlc a1M b2M) ("Markers of Inflammation~{super 3} \brdrl\brdrs\brdrt\brdrs\brdrr\brdrs" crp plr albumin il6); */ column Parameter eri ("Middle Molecules~{super 2}" combFlc a1M b2M) ("Markers of Inflammation~{super 3}" crp plr albumin il6); define Parameter/group "Parameter" format=cp. order=internal style(header)=[borderrightcolor=&bcolor] style(column)=[borderrightcolor=&bcolor]; define eri/display "ERI~{super 1}" style(header)=[borderrightcolor=&bcolor just=c] style(column)=[borderrightcolor=&bcolor just=d]; define combFlc/display "Combined FLC" style(header)=[borderrightcolor=white cellwidth=1.25in just=c] style(column)=[just=c]; define a1M/display "~{unicode 03B1}1M" style(header)=[borderrightcolor=white just=c] style(column)=[just=c]; define b2M/display "~{unicode 03B2}2M" style(header)=[borderrightcolor=&bcolor just=c] style(column)=[borderrightcolor=&bcolor just=c]; define crp/display "CRP" style(header)=[borderrightcolor=white just=c] style(column)=[just=c]; define plr/display "PLR" style(header)=[borderrightcolor=white just=c] style(column)=[just=c]; define albumin/display "albumin" style(header)=[borderrightcolor=white just=c] style(column)=[just=c]; define il6/display "IL-6" style(header)=[borderrightcolor=&bcolor just=c] style(column)=[borderrightcolor=&bcolor just=c]; compute before Parameter; if Parameter=. THEN CALL DEFINE(_col_, "Style", "STYLE=[bordertopcolor=&bcolor]"); ENDCOMP; /* This is to add line at bottom of table */ compute Parameter; if Parameter = 8 THEN CALL DEFINE(_col_, "Style", "STYLE=[borderbottomcolor=&bcolor]"); endcomp; compute eri; if Parameter = 8 THEN CALL DEFINE(_col_, "Style", "STYLE=[borderbottomcolor=&bcolor]"); endcomp; compute combFlc; if Parameter = 8 THEN CALL DEFINE(_col_, "Style", "STYLE=[borderbottomcolor=&bcolor]"); endcomp; compute a1M; if Parameter = 8 THEN CALL DEFINE(_col_, "Style", "STYLE=[borderbottomcolor=&bcolor]"); endcomp; compute b2M; if Parameter = 8 THEN CALL DEFINE(_col_, "Style", "STYLE=[borderbottomcolor=&bcolor]"); endcomp; compute crp; if Parameter = 8 THEN CALL DEFINE(_col_, "Style", "STYLE=[borderbottomcolor=&bcolor]"); endcomp; compute plr; if Parameter = 8 THEN CALL DEFINE(_col_, "Style", "STYLE=[borderbottomcolor=&bcolor]"); endcomp; compute albumin; if Parameter = 8 THEN CALL DEFINE(_col_, "Style", "STYLE=[borderbottomcolor=&bcolor]"); endcomp; compute il6; if Parameter = 8 THEN CALL DEFINE(_col_, "Style", "STYLE=[borderbottomcolor=&bcolor]"); endcomp; run;
... View more