×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Rounding

Rounding

(OP)
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.

RE: Rounding

What Database are you using?

CharlesCook.com
ADP - PeopleSoft - SAP
ReportSmith - Crystal Reports - SQR - Query - Access
Reporting - Interfaces - Data Mining

RE: Rounding

(OP)
I'm running ADP E1000 V.2 on a SQL Server 2000 DB.

RE: Rounding

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

RE: Rounding

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?

RE: Rounding

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

RE: Rounding

How do you truncate to a derived 2 digit field?

RE: Rounding

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

David L. Black Consulting

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close