[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Highlight a field based on value in another field in SSRS

Posted on 2016-09-02
4
Medium Priority
?
82 Views
Last Modified: 2016-09-03
I have a request on a report to highlight a value in one field based on a value from another field, is that possible in SSRS?

They would like the have the "ACFD Level Of Service" value of "Cancelled - PTA or At Scene - No Pt Contact" either highlighted or text color in red if the "PPlus Arrival Time (Min)" value is greater that 5.00 Min.

Sample of Fields
0
Comment
Question by:srodgers45
[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
  • 2
  • 2
4 Comments
 
LVL 16

Accepted Solution

by:
DcpKing earned 2000 total points
ID: 41782952
Hi!
Here's an example of how to set the background colour of a cell in a tablix depending on the content of another cell
The first screenshot shows you what we want to end up with - the employee ID with a background of red if the employee minutes are zero
The second shows the tablix being edited - I've right-clicked on the cell I want to change colour and chosen Text Box Properties from the menu.
        I've then chosen the Fill page within this dialog. What I'm going to do is click on the fill color expression button, labeled fx.
The third screenshot shows you the expression I've used.
= iif(fields!Minutes.value = 0, "Red", "No Color")

Open in new window

Remember that:
1. you must start the expression with an equals sign!
2. iif takes three arguments - the control (a boolean expression), the result if the control is true, and the result if the control is false
3. "No Color" means just base transparent, so if you have an image behind your tablix then it'll show through
4. For the Control you have to refer to the other field's value, hence the ".value"

Hope this gets you on your way

Mike
PS This was done using SQL Server 2012. The language has not, I believe, changed, but if this doesn't work then please ask!
Screenshot-from-2016-09-03-09-47-07.png
Screenshot-from-2016-09-03-09-47-44.png
Screenshot-from-2016-09-03-09-48-08.png
0
 

Author Comment

by:srodgers45
ID: 41783024
Thanks for your time, however that fills all values in the "ACFD Level of Service" columns, I only want to fill if the "PPlus Arrival Min" is greater than 5.00 min and the actual value (Text) for level of service is "Cancelled - PTA or AT Scene - No Pt Contact"  is there a way to do that?

Thanks again!
0
 

Author Closing Comment

by:srodgers45
ID: 41783095
I was able to figure out the rest of what I needed from what you sent. I have another related question, I will post it separately. Thanks
0
 
LVL 16

Expert Comment

by:DcpKing
ID: 41783186
Sorry! I was out shopping when you replied, so didn't see the second part of the question. It should have been something very similar to
= iif( (Fields![PPlus Arrival Min].value > 5.00 and Fields![Level of Service].value = "Cancelled - PTA or AT Scene - No Pt Contact"), "Red", "No Color")

Open in new window


but well done on getting it to work!

Hope this all helped

Mike
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

Written by Valentino Vranken. A while ago I wrote an article called Chart Optimization Tips (http://www.experts-exchange.com/articles/Microsoft/Development/MS-SQL-Server/MS-SQL_Reporting/Chart-Optimization-Tips.html).  This article explained how …
Steps to solve SSRS SQL 2008 R2 User Access Control (UAC) Permission Error With the introduction of SQL Server 2008 R2 and Vista (Windows 7 as well) came new enhanced security features. One of the features included was User Access Control (UAC) t…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

656 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