Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Rounding numbers - prevention Post Reply Post New Topic
Author Message
Snowharp
Newbie
Newbie
Avatar

Joined: 09 Mar 2010
Location: United States
Online Status: Offline
Posts: 3
Quote Snowharp Replybullet Topic: Rounding numbers - prevention
    Posted: 09 Mar 2010 at 1:23pm
I am producing reports connected with payroll.  The reports are used for budgetting purposes and we do not want Crystal Reports to indulge in any rounding at all.  Even one cent off seems to upset the Finance people.
 
I have searched the net for solutions but so far there appears to be no easy way to tell Crystal to leave the numbers as they are.  I would like to display the results with two decimal places and if that means truncating a third decimal number then so be it.
 
Settings in the customized rounding dialog seem to be without a simple setting that says "no rounding". 
 
The numbers start with three decimal places but the report requires that we display only two.  Advice would be most welcome.
IP IP Logged
razzak
Newbie
Newbie
Avatar

Joined: 03 Mar 2010
Location: India
Online Status: Offline
Posts: 34
Quote razzak Replybullet Posted: 09 Mar 2010 at 8:51pm
select the field to which you want to show two decimal places.right click on the field go to format field-->go to number tab -->click on customize-->then in Decimal select "1.00".
 
please let me know if any problem.
 
Razzak Sayyed
IP IP Logged
Snowharp
Newbie
Newbie
Avatar

Joined: 09 Mar 2010
Location: United States
Online Status: Offline
Posts: 3
Quote Snowharp Replybullet Posted: 10 Mar 2010 at 5:14am
Thanks for your response but this does not deal with the issue of rounding.  For example; a column of about 8 subtotals is added up and the result is 1,204.258.  We want the displayed result to be 1,204.25 but Crystal Reports keeps posting 1,204.26 which, according to the finance people is one cent off. 
 
If you add that column of figures with a calculator you get 1,204.25 and that is what they want to see.
 
I simply want to find a way to force the display to clip the third decimal off without causing it to round up the 100th decimal place.  There are so many settings we can use but none seems to address this at all. 
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 10 Mar 2010 at 8:19am

There is a truncate function.  That should elimate the rounding issue.

 
I hope this helps.
 
IP IP Logged
razzak
Newbie
Newbie
Avatar

Joined: 03 Mar 2010
Location: India
Online Status: Offline
Posts: 34
Quote razzak Replybullet Posted: 11 Mar 2010 at 5:33am
yes truncate will help you .
use truncate({table1.amt},2)
Razzak Sayyed
IP IP Logged
Snowharp
Newbie
Newbie
Avatar

Joined: 09 Mar 2010
Location: United States
Online Status: Offline
Posts: 3
Quote Snowharp Replybullet Posted: 11 Mar 2010 at 5:35am
Yes, thanks for this advice.  I have tried Truncate() and it seems to work pretty well.  Excellent !
 
 
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.016 seconds.