Microsoft training courses | Wise Owl - home page

Phone (01457) 858877 or email

TWO WAYS TO CREATE ALTERNATING COLOURS IN SSRS

Part one of a three-part series of blogs

A common requirement for Reporting Services reports is to colour alternate rows. This blog gives two approaches, one of which uses custom assemblies.

  1. Alternating Colours in Reporting Services Tables (this article)
  2. Alternate Colours using Conditional Formatting
  3. Alternate Colours using a Custom Assembly
Posted by Andy Brown on 03 August 2012 | 2 comments

Alternating Colours in Reporting Services Tables

This blog shows how you can create alternate colours in a report, using a simple way (which sometimes works), and then a more complicated (but more reliable) way.  I'm intending it as a practical example of the use of custom assemblies.

Alternate rows table

The effect we're trying to achieve.

 

The rest of this blog is split into 2 parts: a simple way to create alternate colours using conditional formatting, and a more complicated way using a custom assembly. 

TWO WAYS TO CREATE ALTERNATING COLOURS IN SSRS

Part one of a three-part series of blogs

A common requirement for Reporting Services reports is to colour alternate rows. This blog gives two approaches, one of which uses custom assemblies.

  1. Alternating Colours in Reporting Services Tables (this article)
  2. Alternate Colours using Conditional Formatting
  3. Alternate Colours using a Custom Assembly

Comments on this blog

This blog has 2 comments:

Comment added by Ashok on 07 September 2012 at 07:57 GMT
This is a good solution to put alternate colors in rows. but what if the color is a gradient color. Can we put gradient colors in the alternate rows instead of simple color.
Reply from Andy Brown (blog author)
I believe that gradient colours can only be used in charts and in gauges - so you can't do normal gradient colours in tables, let alone alternating ones.
 
Comment added by Richard C. on 15 January 2013 at 15:11 GMT

If I'm trying to alternate the colours for group header rows (useful with drill downs / outlining), I've used something like this:

=IIF(RunningValue(Fields!fieldname.Value, COUNTDISTINCT, NOTHING) MOD 2 = 0, "Gray", "White")

All content copyright Wise Owl Business Solutions Ltd 2013. All rights reserved.