Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Formula Question Post Reply Post New Topic
Author Message
sukh007
Newbie
Newbie
Avatar

Joined: 17 Jun 2008
Location: United Kingdom
Online Status: Offline
Posts: 7
Quote sukh007 Replybullet Topic: Formula Question
     Posted: 17 Jun 2008 at 7:24am
Hi Guys
 
I have a field that contacins data such as:
 
Test (Billy Bob)
Another Test (Billy Bob)
 
Basically I want to create a formula that will only display the information before the open bracket as below:
 
Test
Another Test.
 
I can't seem to figure out how to obtain this.  I can do the below query in SQL and get the result but Crystal has slightly different syntax.
 
select left(<fieldname>,charindex(' ',<fieldname>)-1)
 
Thanks for the help
IP IP Logged
sukh007
Newbie
Newbie
Avatar

Joined: 17 Jun 2008
Location: United Kingdom
Online Status: Offline
Posts: 7
Quote sukh007 Replybullet Posted: 17 Jun 2008 at 7:46am
Hi Guys
 
I managed to answer my own question.  For anyone wanting to do the same the formula is as follows:
 
left({field_name}, Instr({field_name},"(")-1)
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