Solved

SSRS - Conditional Formatting

Posted on 2013-12-11
8
1,006 Views
Last Modified: 2013-12-20
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.

Matrix Results
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
0
Comment
Question by:EnsingerIT
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
8 Comments
 
LVL 37

Expert Comment

by:ValentinoV
ID: 39711295
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")
0
 

Author Comment

by:EnsingerIT
ID: 39711412
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
0
 
LVL 37

Expert Comment

by:ValentinoV
ID: 39711479
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.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:EnsingerIT
ID: 39713476
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.

design view
Thank you for your advice so far!

Pat
0
 
LVL 37

Expert Comment

by:ValentinoV
ID: 39713484
"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.
0
 
LVL 27

Expert Comment

by:planocz
ID: 39718230
Did I miss this in the reading above?

the expression has to be in the textbox windows properties color box.
0
 

Accepted Solution

by:
EnsingerIT earned 0 total points
ID: 39720982
I Finally solved this with this equation on the textbox field.

=IIF(Fields!SLA_Status.Value = "True" and CountRows() > 0,"IndianRed","PaleGreen")

I had used a case statement in the original SQL Query, to display "Overdue" or "within SLA" and that I think was the route of my problem.

Pat
0
 

Author Closing Comment

by:EnsingerIT
ID: 39731408
It's my own solution...
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
efficient backup report for SQL Server 13 81
Creating a View from a CTE 15 49
T-SQL Query 9 36
File attachment in the SQL Database from application 10 48
Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question