开发者

Background color change in SSRS

开发者 https://www.devze.com 2023-04-10 01:04 出处:网络
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.

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?


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.


Some Browsers cannot handle "Transparency" or "No Color".

It is best to add "White" as the background color. All browsers can handle white.


Your code is fine. The problem is that "No Color" is not a defined color. Replace "No Color" with "Transparent"

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号