Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Need help building a 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: Need help building a formula
     Posted: 24 Apr 2012 at 9:46am
I have both French and English in my database. I have created a report in English and want the field {Notes} to only show the English text.

The way the information is entered all English text starts with <@@ and ends with @@>.

I need a formula to only extract the text between <@@ and @@>


thanks in advance
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 24 Apr 2012 at 10:42am
local numbervar start := instr({table.field}, "<@@");
local numbervar dne := instr({table.field}, "@@>");
 
mid({table.field}, start + 3, dne - start - 4)
 
if it isn't right on, it should be pretty close.
IP IP Logged
blazeme182
Groupie
Groupie
Avatar

Joined: 15 Dec 2009
Online Status: Offline
Posts: 44
Quote blazeme182 Replybullet Posted: 25 Apr 2012 at 5:29am
Thank You a lot it worked great one small correction I had to make because it was cutting out the last character. This below worked great.

local numbervar start := instr({table.field}, "<@@");
local numbervar dne := instr({table.field}, "@@>");

mid({table.field}, start + 3, dne - start - 3)
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