SSRS: Table and Matrix Row/Column Background Colors

For a table
=IIF(RowNumber("DataSet1") MOD 2 = 0,"Gainsboro","White")

For a Matrix
Different per Column:
=IIF(RunningValue(CountDistinct("Tablix1"),Count,"Tablix1") MOD 2 = 1,"Gainsboro","White")

Different per Row:
=IIF(RunningValue(Fields!FieldName.Value,CountDistinct,"Tablix1") MOD 2 = 1,"Gainsboro","White")








Advertisements

One thought on “SSRS: Table and Matrix Row/Column Background Colors

  1. Thanks for this example, but I do have a question though.

    I have a matrix tablix and the column group is grouped by Type and in the details I’m using an express like SUM(Count(Fields!name.value).

    The number of columns depends on the list of Types I have available.

    I’m trying to make a column be one color while the others are another color. However, since some cells may not have a value at all, that cell gets skipped when I wanted it to be filled with the same color as the cell that does have a value.

    Hope my explanation makes sense.

    Thanks!

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s