Discussion Locked

Chrystal report problem

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I have an SQL data base where the numeric fields have 8 places after the decimal. When ever a report is generated that has an answer of 2 decimals the reports are always off by pennies caused by rounding. Any ideas of how to fix this?

Thanks

2 replies

by jgarcia102066

If you can change your database to be a decimal type value with a precision of 2 (two decimal places), then your calculations will be correct in your report.

If you cannot change your database, you will either have to accept the rounding errors or you can implement a rounding algorithm to help you get the results you're looking for.

You can see a sample algorithm at http://fixedpoint.sourceforge.net/html/lib/fixedpoint-rounding.html

Good Luck.

by deepsand

This is a tech. problem, in search of a solution.

It properly belongs in "Technical Q&A," not in "Discussions."

Please re-post there.

Thank you.

This discussion is closed to new replies.