Author |
Topic |
huynhtl
Posting Yak Master
107 Posts |
Posted - 2008-06-24 : 13:30:10
|
Hi,Not sure what I did wrong to this code. What I would like this code to produce is, if any number is less than 0 (negative) than it should be red, if it's greater than 0, it should be black. Somehow it comes back red even though it's a positive number. =iif(Fields!balance.Value < 0,"red","black")1,106,666 472,169 -61,991680,138 101,507 83,670 19,67317,6492,344,837 |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-06-25 : 02:10:05
|
Just give this expression for color property of cellIIF(Me.Value<0,"Red","Black") |
|
|
huynhtl
Posting Yak Master
107 Posts |
Posted - 2008-06-27 : 17:40:20
|
I got it in the rows, now i'm having problem with it in the subtotal. I have 4 columns and I would like the color to be change if negative, red, if positive,black in the subtotal.I've tried =iif(sum(me.value) < 0,"red","black") and iif(sum(me1.value) <0,"red","black") and iif(sum(me2.value) <0,"red","black")and iif(sum(me3.value) <0,"red","black").This just give me an error. Please HELP!!!!!!!!!!!! |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-06-28 : 03:15:32
|
quote: Originally posted by huynhtl I got it in the rows, now i'm having problem with it in the subtotal. I have 4 columns and I would like the color to be change if negative, red, if positive,black in the subtotal.I've tried =iif(sum(me.value) < 0,"red","black") and iif(sum(me1.value) <0,"red","black") and iif(sum(me2.value) <0,"red","black")and iif(sum(me3.value) <0,"red","black").This just give me an error. Please HELP!!!!!!!!!!!!
no need of sum there just give Me.Value itself. |
|
|
|
|
|