Configure BigDecimal-textfield rounding by default



I need to configure in all my jasper models by default textfield whose expression is a BigDecimal, rounding the value to the upper digit. My textfiled has like pattern "#,##0.00" and it happens that Jasper rounds 0.295 to 0.30, while the sum expression 2.95+0.295 is rounded up to 3.24 instead of 3.25 as desiderable.
Is it possible to configure a Jasper parameter so you always have by default the same behavior in a "BigDecimal-textfield" without having to act promptly on each textfield expression in all models [eg. using $V{myVariable}.setScale(2,RoundingMode.HALF_UP)]?
lorenzo.gabrielli's picture
Joined: May 20 2016 - 2:10am
Last seen: 4 years 2 months ago

0 Answers:

No answers yet