Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Looking for drop text formula Post Reply Post New Topic
Author Message
blazeme182
Groupie
Groupie
Avatar

Joined: 15 Dec 2009
Online Status: Offline
Posts: 44
Quote blazeme182 Replybullet Topic: Looking for drop text formula
     Posted: 17 Apr 2013 at 7:42am
Hey I need help construction a formula that drops all the text before and after a formula


example:
below is the data in the field
john likes apples
<<john went to the store>>
john buys lots of apples

I would like for my report to only show "john went to the store".

If possible I would like the formula to reject all text before and after the <<>> instead of only taking what is in the middle.

Edited by blazeme182 - 17 Apr 2013 at 7:43am
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 17 Apr 2013 at 7:56am

a few ways to do this but here is one

 
left(mid({string},instr({string},"<<")+2),instr(mid({string},instr({string},"<<")+2),">>")-1)


Edited by DBlank - 17 Apr 2013 at 7:57am
IP IP Logged
blazeme182
Groupie
Groupie
Avatar

Joined: 15 Dec 2009
Online Status: Offline
Posts: 44
Quote blazeme182 Replybullet Posted: 17 Apr 2013 at 9:16am
That works but not for what I am trying to do.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 17 Apr 2013 at 9:21am
clarification please? You want to include the << and >> on either end???
 
left(mid({string},instr({string},"<<")),instr(mid({string},instr({string},"<<")),">>")+1)


Edited by DBlank - 17 Apr 2013 at 11:29am
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