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

Simple Nube Question 1

Status
Not open for further replies.

WANguy2k

MIS
Feb 25, 2002
363
US
I'm using the following formula to calculate discount. I put the result in a string that I use to export to a CSV file.

Round (({MSRP}-{@Selling price})/{MSRP}*100,0)

The problem is the result displays with 2 decimal points:

69 percent displays as 69.00

I can't format the field in the report because it's part of a longer string. I need for the result of the formula to contain no decimals.

I tried this: INT(Round (({MSRP}-{@Selling price})/{MSRP}*100,0))

Still displays with .00 after it. Thanks in advance.
 
WANguy2k,

This should resolve your issue:
Code:
ToText(Round (({MSRP}-{@Selling price})/{MSRP}*100,0),"0")



Mike
---------------------------------------------------------------
"To be alive is to revel in the moments, in the sunrise and the sunset, in the sudden and brief episodes of love and adventure,
in the hours of companionship. It is, most of all, to never be paralyzed by your fears of a future that no one can foretell."
 
umm... sorry.... missed a part.

Code:
ToText(Round (({MSRP}-{@Selling price})/{MSRP}*100,0),0,"")

Mike
---------------------------------------------------------------
"To be alive is to revel in the moments, in the sunrise and the sunset, in the sudden and brief episodes of love and adventure,
in the hours of companionship. It is, most of all, to never be paralyzed by your fears of a future that no one can foretell."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top