Conditional Background Color

  • 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")

  • The second example that you gave is syntactically correct. The colors have to be in double quotes. For some reason, it seems like it's having an issue with the colors that you chose. To verify that, try substituting simpler colors like this:

    iif( Fields!ReportRevenue.Value = 1,

    "Red", "Blue")

    BTW, I was able to use your same colors in a test report, although it was SSRS 2005.

    Greg

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply