Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Compare against all single values of a comma delimited string 2

Status
Not open for further replies.

nilsbinnemans

Programmer
May 14, 2012
14
GB
Hi,

I'm using CR 2011.
I have a table containing a string field with comma separated values.
Data could look like this:
Record
String​
1
StringA​
2
String A, String AB​
3
null​
4
StringAB​
5
StringB​


I want to suppress all records where {Table.String} contains 'StringA'.
I can't use 'StringA' in {Table.String} because record 4 with string 'StringAB' must be kept.
Desired outcome:
Record
String​
3
null​
4
StringAB​
5
StringB​

Which formula could help me out here?

Thanks,
Nils
 
Try this:
if isnull (table.string} true else "stringA" in {table.string}

Howard Hammerman,
Crystal Training and Crystal Material
On-site classes and one-on-one coaching
Low-cost telephone/email support
 
What about:

'StringA,' in {Table.String}

Cheers
Pete

 
I think the following works. (Using pmax9999's post above - Thanks for the clever idea.)

Create the following formulas

@AddComma
[tt](Table.String}&",";[/tt]


@HasStringA
[tt]if "String A," in {@AddComma} then 1 else 0[/tt]

Use [tt]{@HasStringA}=1[/tt] as the Suppress Condition for the Details section.







 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top