Avatar of Sue Taylor
Sue Taylor
Flag for United States of America asked on

ssrs expression help

I'm wanting to set a background color in my report to turn red if one condition is like "DOM" and a second condition is either "USA" or "SEECERT".  I have tried to get the syntax correct and haven't figured it out.

=iif(Fields!item_id.Value) Like "%DOM%" AND (Fields!coo.Value <> "USA" OR Fields!coo.Value <> "SEECERT"), 'Red', 'No Color'

Using Visual Studio 2012
Microsoft SQL ServerSSRSMicrosoft Visual Studio

Avatar of undefined
Last Comment
ValentinoV

8/22/2022 - Mon
SOLUTION
Vaibhav Goel

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
ValentinoV

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Sue Taylor

ASKER
None of the solutions provided worked.  I would always get an error BC30201.

The ItemID field is a varchar40
The coo field is a varchar255

I'm using Visual Studio 2012

I am entering this expression in the FILL section of Text Box Properties

I want to be able to change the color if the ITEMID contains the characters "DOM" in it and the coo is NOT either "USA" or "SEECERT"

"DOM" is an abbreviation for domestic.  "DOM" can be anywhere within the field.  Examples are:
     62C225BA2G/DOM/LW
     62C225BLIM/DOM
     50F300HCS8/DOM-NP

The coo field stands for country of origin.  Examples of this field are:
CHINA
TAIWAN
USA
SEECERT
JAPAN
INDIA

My goal is to be able to quickly show the report reader an Item ID that is supposed to be domestic having a coo something other than USA or SEECERT.
SOLUTION
Sue Taylor

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
ASKER CERTIFIED SOLUTION
ValentinoV

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Your help has saved me hundreds of hours of internet surfing.
fblack61