Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Filter Field that contains * Post Reply Post New Topic
Author Message
rebeccah
Newbie
Newbie


Joined: 25 Aug 2011
Online Status: Offline
Posts: 4
Quote rebeccah Replybullet Topic: Filter Field that contains *
     Posted: 01 Sep 2011 at 10:37am
I have a field that contains text in the form of: aaaa(*bbb) and aaaa(bbb).
 
How do I filter this field so that the records with * do not show?
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 01 Sep 2011 at 10:40am
you can use instr() in the select expert to remove rows what have that
 
instr(table.field,"*")=0
IP IP Logged
rebeccah
Newbie
Newbie


Joined: 25 Aug 2011
Online Status: Offline
Posts: 4
Quote rebeccah Replybullet Posted: 01 Sep 2011 at 11:08am

Perhaps I misunderstood, but I entered:

not ({customer.customer_name} like ["*(X", "*(Z", ".", 'instr(CUSTOMER.CUSTOMER_NAME,"(*")=0'])
 
and the starred records are all still appearing in my report.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 01 Sep 2011 at 11:13am
you cannot use the like with this because like uses * as a wildcard
just using
instr(CUSTOMER.CUSTOMER_NAME,"*")=0
will exclude any rows thatuse the * anywhere in the string
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum