Print Page | Close Window

Every Formula field is in currency format?

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=8709
Printed Date: 01 May 2024 at 4:30pm


Topic: Every Formula field is in currency format?
Posted By: dchurch
Subject: Every Formula field is in currency format?
Date 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.



Replies:
Posted By: DBlank
Date Posted: 22 Dec 2009 at 7:42am
are you converting a number to text?
totext(numberfield,0,"")


Posted By: dchurch
Date 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.


Posted By: dchurch
Date 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!


Posted By: DBlank
Date 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



Print Page | Close Window