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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formatting Formula 1

Status
Not open for further replies.

Tremplo

MIS
May 16, 2001
11
0
0
US
I have to export gross wages for the quarter for our Unemployment Wages report. My problem is that I am building a line with spacing specific, so I am building multiple text formulas to create my individual lines (actually in the group footer). My data automatically comes through to text as 99,999.99 and I cannout have any commas or periods within my result. How do I strip out the commas and periods or format the numeric data field to be general (no commas).

I can multiply my gross wages by 100 to eliminate the need for a decimal point, I think.
 
Hi,

Mutiplying by 100 would be only a partial solution, as you would presumerably find that 2 new decimal places would replace the 2 being dispayed now!

This is because the number may be 12.3456 and hence displayed by default as 12.34

To see if your data has more decimal places being held change the format selection to display 4 decimal places.

If you still wish to return the value in the way you suggested you would need to remove all digits after the second decimal place using the formula...

totext({field)*100,"#")

Hth,
Geoff

 
If you want to round the numeric value with no comma or period then

totext({numericField},0,"","")

if you want to keep the decimal values but don't want commas or decimal point then

totext({numericField},2,"","")

where the 2 refers to 2 decimal point rounding but the comma and decimals are set to null

Jim


 
In both examples you are specifying that the thousands separator SHOULD be a comma. If you don't want the comma the last argument should be "" instead of "," . Ken Hamady, On-site/Phone Crystal Reports Training/Consulting
Quick Reference Guide to using Crystal in VB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top