August 31, 2006 at 11:01 am
I have a field in a table with the following =Fields!whatever.value & vbCrLf & IIF(Fields.Whenever.value > 0 "RED", "BLACK") but all i get is an error... what i am trying to do is make the second values Text RED if its greater then 0 ... but it doesn't seem to work... is there something i am doing wrong??? please let me know .... thanks
Moe C
August 31, 2006 at 11:38 am
Can the second value be a different cell in the same table? If so, the color can be controlled by the properties of the cell.
August 31, 2006 at 12:08 pm
Hi,
To get dynamic color, all you have to do is select the field from table and set the color poperty through expression.
For example, suppose you have field called UnitPrice, and you want the red color to all of them which has value not greater then zero.
=IIF(Fields!UnitPrice.Value > 0,
"Black", "Red")
Hope this helps.
Asif
August 31, 2006 at 12:35 pm
The seconds part has to be in the same field as the other one...
Moe C
August 31, 2006 at 6:58 pm
The Color property of your textbox should have
=IIF(Fields.Whenever.value > 0, "RED", "BLACK")
While the Value property will be
=Fields!whatever.value
The expression you posted may have been failing because of the missing comma (just guessing) but even so with the expression lin the Value property, at best you would display
1
BLACK
HTH
September 1, 2006 at 4:19 pm
This wont work it will color both fields that i have in the textbox RED ... i just want to color the single Field!whenever.value not both
Moe C
September 5, 2006 at 12:46 am
Just so I'm sure I've got this straight.
You have 2 fields displayed in the one text box? And you want the colour of the second to be dynamic (and therefore potentially different from the first)? Is that correct?
The colour property of a textbox (I believe) applies to the whole textbox. If you want a different colour, you'll need a different textbox.
September 5, 2006 at 10:48 am
That is correct ...
Moe C
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply