How to get decimal values rouded to two
Posted on December 28, 2015 at 4:47am
In my Japer report when Im using $F{value}.doubleValue() which results 10.0
Now the Requirement is to display 10.00.
What should I use to get 10..0 rather than 10.0 |
Thanks.
Joined: Sep 9 2015 - 9:58am
Last seen: 2 years 6 days ago
Posted on December 28, 2015 at 5:41am
You can use pattern option. Go textfields properties. Under text field section you will see the pattern.
Joined: Nov 19 2014 - 11:02pm
Last seen: 6 years 8 months ago
Posted on December 28, 2015 at 10:45pm
what would be the proper method to insert the formatting in the expression editor.
sspecifically becuase one wants to mix both a formatted number and a formattted date in the same text field box?
Thanks
Joined: Mar 6 2015 - 9:38pm
Last seen: 6 years 2 weeks ago
Posted on December 29, 2015 at 1:53am
Formatting in expression editor:
number format example:
new java.text.DecimalFormat("#,###.00").format($F{price})
date format example:
new java.text.SimpleDateFormat("dd/MM/yyyy").format($F{date})
you can check the java expressions for others.
Joined: Nov 19 2014 - 11:02pm
Last seen: 6 years 8 months ago