Clarity

Expand all | Collapse all

Jaspersoft 6.2.1: Rounding up numbers (BigDecimal) in reports

  • 1.  Jaspersoft 6.2.1: Rounding up numbers (BigDecimal) in reports

    Posted Nov 27, 2017 11:09 AM

    I had been looking for a way to Round Up numbers in Jaspersoft (not through the query). Took me some time to figure it out, so i'll share it wth you.

     

    But Jaspersoft (6.2.1) does not seem to offer such a function.

     

     

    The trick is to add the following in the expression editor:

     

    $F{MYFIELD}.setScale(0, BigDecimal.ROUND_HALF_UP)

     

    That'll do the trick...



  • 2.  Re: Jaspersoft 6.2.1: Rounding up numbers (BigDecimal) in reports

    Posted Nov 28, 2017 01:03 AM

    Thanks for sharing this trick