Go Premium for a chance to win a PS4. Enter to Win


Changing color in a SSRS Field using expression

Posted on 2014-02-24
Medium Priority
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
  • 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

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

Question has a verified solution.

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

When trying to connect from SSMS v17.x to a SQL Server Integration Services 2016 instance or previous version, you get the error “Connecting to the Integration Services service on the computer failed with the following error: 'The specified service …
This month, Experts Exchange sat down with resident SQL expert, Jim Horn, for an in-depth look into the makings of a successful career in SQL.
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

916 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