Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 Reporting Services Development
 Conditional Background Color

Author  Topic 

latingntlman
Yak Posting Veteran

96 Posts

Posted - 2008-09-17 : 10:38:28
I'm trying to set the background color for a textbox depending on its value. It's either a 0 or 1. I've tried these two syntax but it keeps coming back with "not valid colors".

What am I missing here? This shouldn't be too hard, should it?


iif( Fields!ReportRevenue.Value = 1,
Honeydew, DarkGreen)

iif( Fields!ReportRevenue.Value = 1,
"Honeydew", "DarkGreen")

reddyshekar
Starting Member

4 Posts

Posted - 2008-09-18 : 06:26:27
Hi,
Try this

=Switch(Fields!ReportRevenue.Value=1,"Honeydew",Fields!ReportRevenue.Value<>1,"DarkGreen")

Thanks
Shekar
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-09-18 : 12:46:41
quote:
Originally posted by latingntlman

I'm trying to set the background color for a textbox depending on its value. It's either a 0 or 1. I've tried these two syntax but it keeps coming back with "not valid colors".

What am I missing here? This shouldn't be too hard, should it?


iif( Fields!ReportRevenue.Value = 1,
Honeydew, DarkGreen)

iif( Fields!ReportRevenue.Value = 1,
"Honeydew", "DarkGreen")



have you checked the list of colors supported by reporting services to see if above colors are included among them?
Go to Top of Page
   

- Advertisement -