Alternating Table Row Colors in SSRS (The Easy Way!)



Alternating Table Row Colors in SSRS (The Easy Way!)

A lot of the applications I work with utilize SQL Server Reporting Services (SSRS) for reporting. I was shown a way by the previous owner of an app to make a table show up in green bar (alternating colors). I added a function to the XML code for the .rdl to determine if the row is odd or even. Then I would add a entry to each item in the table (again in the XML). It never took too long but was a bit of a pain to setup.
I recently found a MUCH easier way. All you have to do is go into the properties of the TableRow and for the BackgroundColor property add in=iif(RowNumber(Nothing) Mod 2, "Green", "White"). D’oh! This much easier to implement and update.


Like This Post? Please share!

  • Share to Facebook
  • Share to Twitter
  • Share to Google+
  • Share to Stumble Upon
  • Share to Evernote
  • Share to Blogger
  • Share to Email
  • Share to Yahoo Messenger
  • More...

No comments :

Leave a Reply

Scroll to top