Link to home
Start Free TrialLog in
Avatar of EnsingerIT
EnsingerIT

asked on

SSRS - Conditional Formatting

I am having problems applying conditional formatting to a single column within a column group of a matrix.

The Matrix is very Simple and the results of it can be seen below.

User generated image
The Columns "overdue" and "within SLA" are part of the column group "SLA_Status"

I need the numbers that are greater than 0 in the overdue column only to be formatted in red.

I am able to have all the numbers in the Column group formatted red by applying this expression =IIf(CountRows() = 0,"Black","Red") but I can't work out how to apply that only to one column in the column group.

All advice very much appreciated.

Pat
Avatar of ValentinoV
ValentinoV
Flag of Belgium image

You can refer to a textbox through the ReportItems collection.  So assuming the textbox that displays the numbers is called Overdue, the expression would look like this:

=IIf(ReportItems!Overdue.Value = 0,"Black","Red")
Avatar of EnsingerIT
EnsingerIT

ASKER

Thanks or your advice!, the Report Items collection is called "SLA_Staus" it is a column group on this Matrix, It has one of two possible values, being either "overdue" or "Within SLA"

The values in the overdue column above are a count of the number of calls that are assigned to a technician that are either overdue or within the SLA.

Given that the Column "overdue" is dynamically created by the matrix column grouping, I don't think I can refer to it by it's report item collection...

Though I'm VERY new to this and may be wrong.

Pat
Even in a matrix it should be possible.  To find its name, select the textbox by clicking it and then look at the Name property in the Properties screen. That's the one to use in the expression.
Hi,

I'm really sorry about this I'm not trying to be dim, but this is all pretty new to me.

below is a shot of how the matrix looks in design mode... I'm not sure where I find the properties of the "overdue" column.

User generated image
Thank you for your advice so far!

Pat
"I'm really sorry about this I'm not trying to be dim, but this is all pretty new to me."

No worries, I like a challenge :)

Thanks for the screenshot, that makes it easier to explain.  And indeed, if the coloring only applies to the Overdue column then the expression needs to get enhanced.

"Overdue" and "Within SLA" are two values of SLA_Status, right?  So you can take that into account in the expression:

=IIf(ReportItems!Overdue.Value > 0 and Fields!SLA_Status.Value = "Overdue","Red","Black")

Open in new window

This expression assumes the textbox is called Overdue.  Your screenshot shows the SLA_Status header textbox as selected.  The one to which the expression should refer is the white one right beneath it.
Did I miss this in the reading above?

the expression has to be in the textbox windows properties color box.
ASKER CERTIFIED SOLUTION
Avatar of EnsingerIT
EnsingerIT

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
It's my own solution...