Tuesday, April 27, 2010

Play with Colors

Most fresh SSRS report developers already accustomed to the way of life in the CR 10 days should find this pretty useful. I was doing some report development this morning and realized how stressful it can get when you try to mix methodologies for very different technologies. In CR 10, to alternate colors when rendering data to get that pop effect was stupid easy. In SSRS 2008, not so intuitive my friend.

However, we all know the importance of rendering data in the most user friendly sense, such that the difficulties you have to conquer in making this possible, becomes worth it.

Anyways, let me get to the meat of this post right here. To get the alternating color scheme in your SSRS report similar to the ones you had in CR 10, here's what you do:
  • Make sure your entire Tablix is selected.
  • Press F4 to pull up your properties tab
  • Go to Background color
  • Pull up a code screen for a new custom expression and enter the following code
  • "=IIF(RowNumber(Nothing) Mod 2, "YourChoiceOfColorHere", "White")
Note: You want to replace "YourChoiceOfColorHere" with whatever color you wish to alternate with white. You run into issues, feel free to shoot me an email.


  1. I just read this blog with absolutely no idea what you were writing( or blogging) about. I did pick up that it was some techie stuff, though I initially thought CR10 had to do with Cristinao Ronaldo. Pardon my cluelessness. It read well and I for some weird patronizing-my-brother's talent motivation, I had a smile on my face after reading it.

  2. lol @ Cristiano Ronaldo. Chief! Chief!