Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: String-number conversion Post Reply Post New Topic
Author Message
awakendream
Newbie
Newbie


Joined: 23 Mar 2009
Online Status: Offline
Posts: 7
Quote awakendream Replybullet Topic: String-number conversion
     Posted: 24 Mar 2009 at 7:07pm
Hi All,

Previously this is my formula :
if isNull({VW_CTRLSUM.ORIGINAL_TRANSACTION_ID}) then '-'
else {VW_CTRLSUM.ORIGINAL_TRANSACTION_ID}

then the error appear 'String is required' and i changed to :

if isNull({VW_CTRLSUM.ORIGINAL_TRANSACTION_ID}) then '-'
else toText({VW_CTRLSUM.ORIGINAL_TRANSACTION_ID},0)

actually this solved the problem, but the result is 6,211,408.
The result should be in number like 6211408
i've tried to use toNumber but 'String is required' error appeared...

Anyone can help to advise on this? thanks a lot
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 25 Mar 2009 at 4:48am
Try totext( field,0,"")
IP IP Logged
awakendream
Newbie
Newbie


Joined: 23 Mar 2009
Online Status: Offline
Posts: 7
Quote awakendream Replybullet Posted: 26 Mar 2009 at 7:15am
Thanks DBlank, it works =)
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