General discussion

Locked

Chrystal report problem

By TomMcM ·
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

This conversation is currently closed to new comments.

2 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Possible Solution...

by jgarcia102066 In reply to Chrystal report problem

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.

Collapse -

Wrong forum

by deepsand In reply to Chrystal report problem

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.

Back to Web Development Forum
2 total posts (Page 1 of 1)  

Related Discussions

Related Forums