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

Remove "," and ".00" from Number Field 1

Status
Not open for further replies.

python138

Technical User
Sep 9, 2004
5
US
Hello,
I have the following formula in Crystal v8.5:

if {glsaprpt.base_amt}< 0 then 0
else ToNumber(right(ToText({glsaprpt.base_amt},0,""),len(ToText({glsaprpt.base_amt}))-1))

The field {glsaprpt.base_amt} has the following value $23,837,877,855.00

I am trying to remove the "," & ".00" from the field {glsaprpt.base_amt} I am able to get rid of the "$" thanks to "mbarron (TechnicalUser)" but even though I have followed the thread767-731523 I am unable to remove the "," & ".00" from the value 23,837,877,855.00.

The value I'm trying to end up with from the {glsaprpt.base_amt} field is 23837877855

I also tried to put the ,0,"" at the end of my formula but that was no good either:
if {glsaprpt.base_amt}< 0 then 0
else ToNumber(right(ToText({glsaprpt.base_amt}),len(ToText({glsaprpt.base_amt},0,""))-1))

Thanks for looking :)
 
Right click on the formula->format->number->choose "-1123"

-LB
 
For future reference, there are a few buttons on the formatting toolbar that allow you to remove the comma and decimals from displaying.
Toggle the button that looks like a comma (,) to remove the comma.
Click the button that looks like a decimal point with 2 decimal places and a arrow pointing to the left to remove displayed decimal places. Click it once for each decimal palce you wish to remove from the display.
There is also a dollar sign button that allows for the toggling of the dollar sign.

~Brian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top