Issue Description
User developed a report with a java.math.BigDecimal parameter.
If he runs the report and passes parameter value like 123456789012345.356, it is displayed properly in the report,
but export to MS Excel contains incorrect value 1234567891012350.
What's the reason and how to fix it?
Resolution
The issue related to limit of MS Excel.
In Excel the maximum number of digits allowed in a number is 15.
Please check the doc below for more details:
The problem in this case is that also when you use the ##0.0E format pattern for this number, some precision is lost, due to the max number of digits limitation.
A possible workaround is to disable cell type detect for the report and the value will be treated as a String value, instead of Numeric:
add proprerty
net.sf.jasperreports.export.xls.detect.cell.type
with false value at the report level.
AS-20190912, case #01793284
Recommended Comments
There are no comments to display.
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