Changing color in a SSRS Field using expression

Posted on 2014-02-24
Last Modified: 2014-03-02
We currently have a report called Inventory Planning.  It basically lists all current inventory, out of stock inventory with open sales orders, and out of stock inventory with open Purchase Orders.

What our buyers face is when they purchase goods  for orders that do not have inventory, the customer will cancel the order (for whatever reasons) ad then we are stuck with inventory we may not necessarily want.  They have told me 98% of the time these orders get cancelled are with brand new customers.

Their question- can we change the font color of the customer if they have never done business with us,

Request seemed simple enough.  I wrote a view of current active customers that have never had been invoiced.

Now the fun part- how do I get SSRS to compare the customer field in the report to my view to change colors?

Any and all help will be appreciated.

Question by:sbalawajder
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
  • 3
LVL 37

Expert Comment

ID: 39884860
Is it an option to (LEFT OUTER) join your view in the query that fetches the data for the report?  Or does it reside in another database?

Author Comment

ID: 39885660
I used a left outer join to bring it into the query. The only problem is comparing it to the customer the order happens to be written up to (which can vary by inventory id)

Accepted Solution

sbalawajder earned 0 total points
ID: 39885714
OK, I about got this figured out.

I LEFT OUTER joined in the view, and I'm selecting on it via a new column


I then put this expression in:

=IIf(Fields!ID.Value = 0, "Black","Red")

Seems to do the trick, just need to verify it's working properly.

Author Closing Comment

ID: 39898374
Figured it out on my own

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
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

690 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