Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trying to format a number as currency with IMPLIED decimal

Status
Not open for further replies.

scottlacourse

IS-IT--Management
Feb 3, 2003
9
US
Working with Crystal 8.5 to create a text file export for a banking project and ran accross a challenge:

I need to take the result of a currency field and format it to have an implied decimal point, for example the current result of a field is 123.45 - I need to represent as 12345.

Drawing a blank - would appreciate any help.

Thanks.
 
Times by 100
is a simple answer and then convert to number
tonumber({field})

jason
 
what about going into the formatting and just changing it to not show the decimal?
 
Jason - good thought - I overlooked the obvious. Statzer - that worked to, thanks guys. Now - as I get into the file requirements I notice I need to pad with zereos on the left so the number always displays 11 places, so:

1234.56 needs to be displayed as 00000123456

I've used right("0000000000" & (100*{number.field}),11)

the problem is number field picks up two more decimals because it is a number format so the result of 1234.56 is 00123456.00 instead of 00000123456

Since the result of the formula is test - I can't take sstatzer suggestion - the formatting option isn't there for test.

Any other ideas to keep the number format from adding the decimals?
 
your formula should be:
right(totext(100*{number.field},"00000000000"),11)


Mike
 
Mike - You da man! - that is exactly what I needed.

Thanks to all three of you for the excellent and very timely help.

Scott
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top