manshack_one Posted January 4, 2010 Share Posted January 4, 2010 I'm having a similar rounding issue as another user here. Attached is a sample report. I ran this query against my database:select Rate, CallDate, Minutes, Revenue, Commission, call2, call1from call_detail where CallDate between '2009-12-01' and '2009-12-15'and Minutes between 1 and 15 and call2 = 'Complete'and call1 = 'Debit'group by Minutes, Rateorder by Minutes, Rate;Revenue and Commission are formatted Double(6,3) in MySQL. Using iReport 3.7 with Groovy as the default language. In the attached report you will see that it's not always rounding correctly. The first Revenue and Commission columns are straight values from the database without any formatting. The second two are formatted using the pattern in iReport for Currency with 2 decimal places. Compare "Interstate 1 minute Commission" with it's formatted commission against "Interstate 15 minutes Revenue" with it's formatted revenue. .155 becomes $0.16 but 5.805 becomes $5.80 instead of $5.81. Double is accurate enough for me since the beginning calculations are small since at most I'm mulitplying 43 cents by 15 minutes. But if it's not rounding correctly then by the time it adds up 15,000 records or so it can be a problem. Please see the attached report to see what I'm talking about. I've attached the jrxml also if it would help with any troubleshooting regardless of being able to actually fill it on your end. Thanks in advance. Link to comment Share on other sites More sharing options...
manshack_one Posted January 5, 2010 Author Share Posted January 5, 2010 Bump I really need help getting this one figured out. I just don't see any good reason why it rounds .005 up in some cases but not in others. Link to comment Share on other sites More sharing options...
manshack_one Posted January 6, 2010 Author Share Posted January 6, 2010 Should I enter a bug tracker for this one? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now