Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Funky Text Formula Post Reply Post New Topic
Author Message
ja_cote
Newbie
Newbie


Joined: 09 Jul 2008
Online Status: Offline
Posts: 12
Quote ja_cote Replybullet Topic: Funky Text Formula
     Posted: 25 Feb 2010 at 1:07pm
Had a hard time finding anything posted around this problem....Maybe it can't be done...
 
OK - here's what I want to do.
 
I have a table of data that has brands in it that have been manually entered.
 
For example:
Atlntc Cove
Atl Cove
Atlant Cov
 
I know that these are all Atlantic Cove brand....
 
Is there a formula that can be used that will print the full brand name?
 
Something like -
 
If BRAND is like Atlantic Cove then "Atlantic Cove"
 
Seems like a stretch to me, but maybe there's something, something...
 
Jeff
Jeff in New Hampshire
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 25 Feb 2010 at 1:49pm

You can use a formula to do this as long as there is consistent logic to apply to it. You can use either the instr() or LIKE functions.

I would try something like:
if table.brand like '*atl*cov*' then 'Atlantic Cove'
else table.brand
//this else assumes you want to return any other brand that does not meet your conditions instead of a blank string


Edited by DBlank - 25 Feb 2010 at 1:50pm
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