Hello,
I'd like to color some fields in my report. The cells of one column (MYFIELD in the example below) should be green, yellow, red depening on the value they contain:
value <= 5 : green
value > 5.01 and < 7.5 : yellow
value >= 7.5 : red
I did the red and green like this:
[tt]
DEFMACRO=COND0001, MACTYPE=RULE, WHEN=MYFIELD LE 5, $
DEFMACRO=COND0003, MACTYPE=RULE, WHEN=MYFIELD GE 7.5, $
TYPE=DATA, JUSTIFY=RIGHT, MACRO=COND0001, COLUMN=MYFIELD, BACKCOLOR=GREEN, $
TYPE=DATA, JUSTIFY=RIGHT, MACRO=COND0003, COLUMN=MYFIELD, BACKCOLOR=RED, $
[/tt]
This works fine. Yet I have a problem with the yellow condition. I want the value of MYFIELD to be between two numbers. I tried to simply add
[tt]
DEFMACRO=COND0002, MACTYPE=RULE, WHEN=ARCKST GT 5.01, $
TYPE=DATA, JUSTIFY=RIGHT, MACRO=COND0002, COLUMN=MYFIELD, BACKCOLOR=YELLOW, $
[/tt]
or this:
[tt]
DEFMACRO=COND0002, MACTYPE=RULE, WHEN=ARCKST GT 5.01 AND LT 7.5, $
TYPE=DATA, JUSTIFY=RIGHT, MACRO=COND0002, COLUMN=MYFIELD, BACKCOLOR=YELLOW, $
[/tt]
But neither worked. Can anybody tell me how to do it right?
Thanx a lot,
Eva
I'd like to color some fields in my report. The cells of one column (MYFIELD in the example below) should be green, yellow, red depening on the value they contain:
value <= 5 : green
value > 5.01 and < 7.5 : yellow
value >= 7.5 : red
I did the red and green like this:
[tt]
DEFMACRO=COND0001, MACTYPE=RULE, WHEN=MYFIELD LE 5, $
DEFMACRO=COND0003, MACTYPE=RULE, WHEN=MYFIELD GE 7.5, $
TYPE=DATA, JUSTIFY=RIGHT, MACRO=COND0001, COLUMN=MYFIELD, BACKCOLOR=GREEN, $
TYPE=DATA, JUSTIFY=RIGHT, MACRO=COND0003, COLUMN=MYFIELD, BACKCOLOR=RED, $
[/tt]
This works fine. Yet I have a problem with the yellow condition. I want the value of MYFIELD to be between two numbers. I tried to simply add
[tt]
DEFMACRO=COND0002, MACTYPE=RULE, WHEN=ARCKST GT 5.01, $
TYPE=DATA, JUSTIFY=RIGHT, MACRO=COND0002, COLUMN=MYFIELD, BACKCOLOR=YELLOW, $
[/tt]
or this:
[tt]
DEFMACRO=COND0002, MACTYPE=RULE, WHEN=ARCKST GT 5.01 AND LT 7.5, $
TYPE=DATA, JUSTIFY=RIGHT, MACRO=COND0002, COLUMN=MYFIELD, BACKCOLOR=YELLOW, $
[/tt]
But neither worked. Can anybody tell me how to do it right?
Thanx a lot,
Eva