Hey everyone, this is my first post so bear with me: I am attempting to produce a PROC REPORT that has different colors based on score (pretty common, lots of literature). The problem is I am having a phantom problem that nobody in my office can explain. Here is the cose. proc report data=selected_peds nowd; where measure='Well Care Visits 7-21 Years' OR measure='Well Child Visits 3-6 Years'; column 'Practice Group'n Measure 'Product Line'n denominator score2 target2 QI_2011 'Quality Index (QI)'n; define 'Practice Group'n / group; define 'Product Line'n / group; define measure / group; define denominator / display "n"; define score2 / "Measure Score " display format=percent.; define target2 / "Measure Target" display format=percent.; define QI_2011 / display 'QI - 2011'; define 'Quality Index (QI)'n / 'QI - 2012' display; compute 'Quality Index (QI)'n; if 'Quality Index (QI)'n < QI_2011 then call define(_col_, 'style', 'style=[foreground=red]'); endcomp; compute score2; if score2 < target2 then do; call define(_col_,'style','style={foreground=red}'); end; ELSE call define(_col_,'style','style={foreground=green}'); endcomp; compute target2; if score2 < target2 then do; call define(_col_,'style','style={foreground=red}'); end; ELSE call define(_col_,'style','style={foreground=green}'); endcomp; run; now notice something, the compute for score2 and target2 have the exact same logic and yet in the results target2 comes up correct (some green and some red) and score2 does not (all green). Both variables are formatted the same in the dataset and in the REPORT. Any ideas? using base 9.2 with Enterprise Guide 4.3 thanks!
... View more