Connecting Tech Pros Worldwide Help | Site Map

Reportviewer changing color at runtime on dataset field

Newbie
 
Join Date: Oct 2007
Posts: 1
#1: Oct 16 '07
I have created a report based on several datasets.

In a textbox linked to a database field is
=First(Fields!FuelWT.Value, "ID_767_Monitor_DataDataSet_BeforeTaxiOut")
This displays the value in the report textbox fine.

My question is how do I change the color of the text
eg if value of FuelWT is > 100000 'red' otherwise 'blue'

I have tried =IIF(Fields!FuelWT,Value>100000,"RED",BLUE") but the text stays black regardless of the value.

Do I need to reference the dataset as in the =First line above?

thanks
Graham
debasisdas's Avatar
Moderator
 
Join Date: Dec 2006
Location: Bangalore ,India
Posts: 7,505
#2: Nov 3 '07

re: Reportviewer changing color at runtime on dataset field


You need to write the formula in the font --> color

try this sample

if {ERRORFINDER.P_DOWN_TIME} >=60 then
color(255,0,0)
else if {ERRORFINDER.P_DOWN_TIME} >=30 then
Color (255,0 ,255 )
Reply