Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: Every Formula field is in currency format? Post Reply Post New Topic
Author Message
dchurch
Newbie
Newbie


Joined: 22 Dec 2009
Location: United Kingdom
Online Status: Offline
Posts: 3
Quote dchurch Replybullet Topic: Every Formula field is in currency format?
    Posted: 22 Dec 2009 at 7:35am
Hi all,

I have a report (CR10) that I have just added a barcode formula field to using IDAutomation UFLs (and that was no mean feat in itself).

The problem is, that no matter what I do to the formula the field still comes out in the format: "13,255.00" wheras what I want to see is "13255" as this is an ID number not a currency.

I don't seem to have any options anywhere to change what CR sees it as.

Does anyone know what I'm doing wrong - it seems that this should be something simple, but I've been searching/struggling now for around 4 hours.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 22 Dec 2009 at 7:42am
are you converting a number to text?
totext(numberfield,0,"")
IP IP Logged
dchurch
Newbie
Newbie


Joined: 22 Dec 2009
Location: United Kingdom
Online Status: Offline
Posts: 3
Quote dchurch Replybullet Posted: 22 Dec 2009 at 7:46am
Here is the function I am using:

IDAutomation_Code128(cstr(ToNumber({RptRawMaterialGoodsInPalletLabel.ORDER_DETAIL_ID})))

I just changed it to 'totext' (as above), but the result is still:

31,818.00

In the table it's coming from it's an INT field and it's value is: 31818.
IP IP Logged
dchurch
Newbie
Newbie


Joined: 22 Dec 2009
Location: United Kingdom
Online Status: Offline
Posts: 3
Quote dchurch Replybullet Posted: 22 Dec 2009 at 7:49am
...wait though!

I didn't add the "" at the end - now it formats correctly.

Thank you so much, I've been struggling with this for hours!
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 22 Dec 2009 at 7:52am
Glad you got it Thumbs%20Up
cstr(x,y,z)
x= field to convert
y=number of decimal places
z=thousand seperator
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.