Link to home
Start Free TrialLog in
Avatar of jaisy99
jaisy99

asked on

Report Builder 3.0 Calculated Field Expression Syntax for item similar to "contains"

I have a field in my database that displays a list of numbers separated by a coma.  Example "0, 1, 2" or "1, 3, 5, 6" .  I want to create a calculated field that says if the original field contains a 1, then display the corresponding text description.  The 1 could be in any location along the series.  I've tried various combinations of Iif, Left, or Like, but these keep resulting in syntax errors.  I'm looking for help to identify the proper function and related syntax.  

Any suggestions are greatly appreciated.

Thank you,
ASKER CERTIFIED SOLUTION
Avatar of ValentinoV
ValentinoV
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jaisy99
jaisy99

ASKER

Thank you for pointing me in the right direction with Instr.  I'm new to report building and did not think to go to Instr first.  I ended up going with the following syntax =IIF(InStr(Fields!CF_Str.Value,"1")>0,"Found", " ")   , but the suggested syntax was helpful as well.
Avatar of jaisy99

ASKER

What I needed.  Thanks!
I ended up going with the following syntax =IIF(InStr(Fields!CF_Str.Value,"1")>0,"Found", " ")   , but the suggested syntax was helpful as well.

Well, as long as your numbers don't go higher than 9 it should work fine.  Otherwise you'll run into the issue mentioned in my first post.