Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Report Design
Message Icon Topic: how to multipy a currency Post Reply Post New Topic
Author Message
_Wired_
Newbie
Newbie
Avatar

Joined: 15 May 2009
Online Status: Offline
Posts: 30
Quote _Wired_ Replybullet Topic: how to multipy a currency
    Posted: 11 Dec 2009 at 6:27pm
i created a formula to multipy a currency.. but it says >>> ("number is required")

but when i change the data type on my database to a number.. my formula is working... how come when it was a currency.. it doesn't work?
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 14 Dec 2009 at 6:11am
it probably depends on what the output looks like. If the output has commas and a dollar sign, CR probably sees it as a string.  Looking in SQL Server, there isn't a currency type...there is money, but it just returns a number.
 
So it all comes down to what the data looks like and how CR interprets it.
IP IP Logged
_Wired_
Newbie
Newbie
Avatar

Joined: 15 May 2009
Online Status: Offline
Posts: 30
Quote _Wired_ Replybullet Posted: 15 Dec 2009 at 4:23pm
ohh ic.. im using access 2003 as my DB... the output has a dollar sign on it.. is there a way to remove the sign?
or is there a alternative way to obtain what i want to do?
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 16 Dec 2009 at 6:08am
you could strip off the first character by using mid({table.field}, 2) and then taking the value of that val(mid({table.field},2)) this will give you a number.  I believe that val will translate/remove the comma that exist like 1,111.11.
 
HTH
IP IP Logged
Post Reply Post New Topic
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



This page was generated in 0.031 seconds.