Background color change in SSRS

reporting-services

I'm trying to Highlight the row for 'Major group' and its 'subgroup' row in my report. where I have to change the background color of the row depending on the string value in the cell.

Ex: if the column has a value 'MG' in it, the cell should show a 'SomeColor, say Green' background color. I tried the following:

=IIF(Fields!ProductGroup.Value = "MG", "Green", "No Color")

tried

=Switch(Fields!ProductGroup.Value = "MG", "DarkViolet", Fields!ProductGroup.Value="SG","Gold")

Nothing is working for me. What am I missing?

Best Answer

If you are using SSRS 2008 or SSRS 2008 R2 Service Release 0 or earlier, No Color and Transparent are 8 digit hex codes ("#FFFFFFFF"), But Background Colors only support 6 digit Hex codes ("#FFFFFF"). The extra two bits are Transparency level and are not supported for Background Colors. You need to use Nothing instead to prevent warnings. I believe this has been fixed in SSRS 2012.

Related Topic