Hi,
I want a value of 3.665 to be rounded to 3.67.
I have a field provided with a BigDecimal. The field is in a crosstab. I've set the field to show 2 decimal places. The problem I am having is that it doesn't seem to round correctly.
In the fields textfield I have:
$V{gpaAverageMeasure}.setScale(2, java.math.RoundingMode.HALF_UP)
Instead of rounding up to 3.67 it rounds down to 3.66.
Any help would be very welcome!
Magnus
Post Edited by phantastes at 03/23/2010 21:02
Post Edited by phantastes at 03/23/2010 22:46
2 Answers:
Posted on July 10, 2015 at 12:46pm
Magnus how you solved it ? I have the same error.
But I use $F{FOB75}.setScale(2,BigDecimal. ROUND_HALF_UP).multiply($F{QRV075}.setScale(2,BigDecimal. ROUND_HALF_UP)) Where $F{FOB75} and $F{QRV075} are a bigDecimal field.
Any idea how to do that right.
Thank you,
EstebanR