Click here to Skip to main content
15,886,822 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
HI i need some help with text color in texbox using an expression,i have a report with some table and had a text with with positive numbers and negative number my requirement here is i need to write an expression like


iif(Fields!Price.Value>0)
then the textcolor should be Black if its less than 0 then the text should be in Red color can any one give me suggestion on how to do that
Posted

1 solution

In the background property choose expression. And then write your code

=IIf(Fields!Price.Value>100,"Black","Red")
 
Share this answer
 
v2
Comments
makwith9789 22-Mar-11 11:43am    
thanks,Appriciate Your time ,do you know how to change the text color
luisnike19 22-Mar-11 11:55am    
The same but change the "Color" property.
makwith9789 22-Mar-11 11:56am    
Found it just the same expression in color prop.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900