10-22-2015 03:15 AM
Could somebody point out please what I am doing wrong...
I have program as below with all variables(test1-test4) numeric however still Compute condition doesn't seems to work.So my intention was basically based on comparison between Test1 and test4 variable set the color of the cell different ...
PROC REPORT DATA=BREACHES NOWD HEADLINE ;
column test1 test2 test3 test4;
define test1 /display ;
define test2 /display ;
define test3 /display ;
define test4 /display ;
IF test1 > test4 THEN DO;
10-22-2015 04:36 AM
What you are describing is traffic lighting, for which there are many documents out there on the subject:
Is result one from Google, and it shows how to do it.
10-22-2015 09:00 AM
PROC REPORT processes the columns in the report from left to right. When it processes TEST1 the value of TEST4 is unknown. Create an alias of TEST4 to create a dummy column to the left of TEST1. Refer to the alias instead of TEST4 in your COMPUTE block. Use the NOPRINT option on the dummy column to keep it from appearing in your report.