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!

Rounding

Status
Not open for further replies.

kpark

MIS
Apr 15, 2005
2
0
0
US
I've rounded a derived field from 3 decimal positions to 2 by using the format field (0.00) function in ReportSmith 3.1. This works fine except when the value in the last decimal pos. is a 5. For example, if the value is 14.575, it should round up to 14.58, but it changes to 14.57. I've also tried using the ROUND() function in my derived field, but this doesn't work either. Can the problem possibly be in the INI file? Any help is appreciated!

Thanks.
 
What Database are you using?

CharlesCook.com
ADP - PeopleSoft - SAP
ReportSmith - Crystal Reports - SQR - Query - Access
Reporting - Interfaces - Data Mining
 
I'm running ADP E1000 V.2 on a SQL Server 2000 DB.
 
You can aways use the old trick of adding .005 to your field and truncating it if you don't come up with a better answer.

David L. Black Consulting
 
I am having a problem rounding from 45,260 to 46,000. IS there a way to do that? To round up to the next thousand?
 
The way I would do this is as follows:
1. Add 999 to your original field.
2. Truncate to a derived 2 digit integer field.
3. Multiply by 1000 with result in an appropriate size derived field to accomodate your largest possible answer.

This may not be the best way but it should work for you.

David L. Black Consulting
 
Sorry, I should have said a whole number. Try trunc("yourfield"/10000)


David L. Black Consulting
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top