Transparent is not a valid background color

I don’t know about you but I hate leave build warnings when I work on something. I am usually not satisfied until Visual Studio’s Error List window is empty, free of any errors (of course) and of any warnings. Lately I was developing some reports for a client where I implemented alternate row coloring to ease the reading of a list-type report.

With the expression in this next screenshot, I get a light grey (WhiteSmoke actually) every odd row. On my even rows, I don’t want to set the background to white. I want it to be transparent so that any color of a control behind would show through. The problem is that when you use the constants in SSRS’s expression builder, selecting “No Color” gives you “Transparent” to use in your expression.

Oddly, using “Transparent” raises warnings in SSRS and doing so fills up the Warning list as such:

What you actually have to use is the Nothing key word and all warnings relating to “Transparent” not being a valid background color will go away. Nothing translates back to a transparent background at run-time so the final output is still the same.

I would have thought that the expression builder would have given me the correct constant to use though! I guess I’ll have to take the habit of writing “Nothing” instead of clicking on the “No Color” selection.


Posted on June 5, 2012, in SSRS. Bookmark the permalink. 1 Comment.

  1. It;s realy useful. Thanks.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: