Conditional Formating on a Matrix SSRS 2008

  • Hi there,

    Need some help here please. What I'm trying to do here is the following; I have a couple of columns that display dates and their respective values. Now the date range will be picked by the user and they will be displayed dynamically in a Matrix.

    Dates

    Oct-12-2011 Oct-31-2011 Nov-01-2011 Dec-12-2011

    1000 4000 7000 9000

    Now I want to format these number dynamically like the value for Oct-31-2011 is different than Oct-12-2011, that should be high lighted with a different color and the same behavior with the other columns.

    Is this possible on a Matrix in SSRS 2008?

    Thanks for your help.

  • Not sure if I inderstand your requirement correctly but here's a way how you can create alternating colors. It's actually for alternating colors for each row,, but if you replace Row Group by Column Group it should work for you as well.

    --Alternating colors in a matrix

    Suppose the basic sample matrix has two columns. 1 is Row group and other is Column Group.

    Steps:

    1. Right Click on Row Group and add another group - New Row Group.

    2. In its row (let say textbox1) expression set "=iif(RunningValue(Fields!RowGroup.Value,CountDistinct,Nothing) Mod 2, "AliceBlue", "White")". If u have more row groups set the expression to "=iif(RunningValue(Fields!RowGroup.Value & Fields!RowGroup1.Value,CountDistinct,Nothing) Mod 2, "AliceBlue", "White")"

    3. Set the data cell's (The intersection of row and column) background color to =ReportItems!textbox1.Value

    4. Thats it the data cell gets the alternate colors. If the Row Groups also need this alternate color then set the expression "=iif(RunningValue(Fields!RowGroup.Value & Fields!RowGroup1.Value,CountDistinct,Nothing) Mod 2, "AliceBlue", "White")" to background color property.

    5.Right Click --> Edit Group on the New Report group and set visiblity to hidden

    [font="Verdana"]Markus Bohse[/font]

  • I don't need alternating column colors. What I need is some method to check if previous value for a date changed and if changed, apply a different background color. Like is the sample data below;

    Oct-12-2011 = 1000

    Oct-31-2011 = 1000 - No background color change because the previous value is the same as this column's

    Nov-01-2011 = 7000 - Background color change because the value has changed from 1000 to 7000 and the same applies to column Dec-12-2011

    Dates

    Oct-12-2011 Oct-31-2011 Nov-01-2011 Dec-12-2011

    1000 1000 7000 9000

    Thanks for your help.

    Manny

  • Hi Midway, did you ever get this to work?  I am looking for the same thing.

  • Hi Markus,

    I was looking for the same solution and saw your reply.  I am trying to do the same thing and please see my screenshot.  I would like to see my Amount2 column to show different colors if the amount is different from the previous cell based on Load_Date (in Column Groups).  Hope you can provide some guidance.  Thank you in advance!

    Attachments:
    You must be logged in to view attached files.

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply