SQL Expression to Highlight cells

I'm trying to highlight a field in my report to make it easier for the user.  I'm using Visual Studio 2012 to write it.  I have a field called bin_cd (varchar40) that I want to highlight if it does not container "ASSM", "ASSEMBLY", "PACKAGE" or does not start with 4P.  The ones that start with 4P will have 3 additional characters have the 4P.  How would I go about doing this?  I've tried to write the expression and get errors.  Even when I try to write the expression for just one rule, I do not get the error, but it does not highlight the field.
Who is Participating?
Arifhusen AnsariBusiness Intelligence Developer and AnalystCommented:
Hello ,

What i have understood from your question is " you want to highlight text field in ssrs report based on the value of column, if it does not contain "ASSM", "ASSEMBLY" and "PACKAGE" and also it must not star with 4P. that filed or text box has to be highlighted.

I tried to replicate your scenario with sample data. I added one column in query to set flag to set back color as 1 or 0. If column value is 1 it will set color or it will not modify any color.

Find attached report. Hope it will help you.

Where do you want the highlighting to occur? Within ssms, or using SQL reporting service, the report display of the resulting data?

Depending on the report, you would either change background color, or the color of the foreground, font.

Not sure ssms includes an option to alter display coloring.
If you use excel to pull data from SQL server, it might be possible to change cell color scheme based on the value.........
Mark WillsTopic AdvisorCommented:
You said you could get one of the rules to work, but not when adding the other.

Can you show us what you have done ?

Both working and then broken ?

What error ?

Assume you are using SSRS - or, if not, then what are you using ?

If SSRS, please read : https://technet.microsoft.com/en-us/library/ms156400(v=sql.100).aspx
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.