Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Formula Help Post Reply Post New Topic
Author Message
FrnhtGLI
Senior Member
Senior Member
Avatar

Joined: 22 May 2009
Online Status: Offline
Posts: 347
Quote FrnhtGLI Replybullet Topic: Formula Help
     Posted: 24 Jul 2009 at 6:37am
I have probably an elementary question, but I'm not great at formulas so here goes.
 
I have a stiring, lets call it {field.str}. This string holds a numeric value of 10 characters. The actual data for the field will look something like '0000003401' or '0000351093'.
 
I need a formula to evaluate the string and remove the leading zeros. That's it.
 
Thanks in advance.
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 24 Jul 2009 at 6:56am
val({field.str})
converts the value to a number...no leading zeros.  if you need it as a string again:
totext(val({field.str}, 0,"")
 
HTH
IP IP Logged
FrnhtGLI
Senior Member
Senior Member
Avatar

Joined: 22 May 2009
Online Status: Offline
Posts: 347
Quote FrnhtGLI Replybullet Posted: 24 Jul 2009 at 7:01am
WOW! I was sure making that harder then it was. I hate it when I try to over think things. Thanks for the help.
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