Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Contains * in text string formula Post Reply Post New Topic
Author Message
grego
Newbie
Newbie
Avatar

Joined: 22 Feb 2008
Location: United Kingdom
Online Status: Offline
Posts: 16
Quote grego Replybullet Topic: Contains * in text string formula
    Posted: 22 Feb 2008 at 2:21am
I am trying to write a formula in Crystal 10 that only returns a text string when that text string contains the * character.  Any ideas on what syntax I should be using?
 
thanks
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 22 Feb 2008 at 6:57am
Try using this formula:
 
If InStr({table.field}, '*') > 0 then {table.field}
 
-Dell
IP IP Logged
grego
Newbie
Newbie
Avatar

Joined: 22 Feb 2008
Location: United Kingdom
Online Status: Offline
Posts: 16
Quote grego Replybullet Posted: 25 Feb 2008 at 2:26am

it worked perfectly - thank you so much - you've saved me hours!

IP IP Logged
Gurbs
Senior Member
Senior Member
Avatar

Joined: 16 Feb 2012
Location: Ireland
Online Status: Offline
Posts: 216
Quote Gurbs Replybullet Posted: 14 Mar 2012 at 1:27am
I want just the opposite of this, I want to exclude everything containing a *. How can I modify the formula for this?
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 14 Mar 2012 at 3:49am
InStr({table.field}, '*') = 0

Edited by DBlank - 14 Mar 2012 at 3:50am
IP IP Logged
Post Reply Post New Topic
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



This page was generated in 0.031 seconds.