Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Syntax Question Post Reply Post New Topic
<< Prev  Page  of 2
Author Message
Gurbs
Senior Member
Senior Member
Avatar

Joined: 16 Feb 2012
Location: Ireland
Online Status: Offline
Posts: 216
Quote Gurbs Replybullet Posted: 19 Feb 2014 at 11:39pm
If it encounters the string value (2.5 MG/3ML) 0.083%, which part do you actually want? The 2.5? If so, you could try and do a replace over the different characters you want to exclude.

Below example replaces the characters "(", ")" and "/" with nothing, so basically it is removing those characters.
tonumber(replace(replace(replace(split({table.field}," ")[1],"(",""),"/",""),")",""))

Testing this on your specific example, I get 2.50 back
IP IP Logged
Mojoflow1000
Newbie
Newbie
Avatar

Joined: 17 Feb 2014
Location: United States
Online Status: Offline
Posts: 7
Quote Mojoflow1000 Replybullet Posted: 20 Feb 2014 at 4:31am
Thanks Gurbs!  In this instance, 2.5 is what we are looking for.   Thank you very much!
IP IP Logged
<< Prev  Page  of 2
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