How to specify the default decimals in Jasper?

Hi All,

I have a field in Jasper and I have defefined this as Number. I want this to hold atleast two decimal places at all the time. not less that that. For example if I pass 4760.4 from the PL/SQL It should display in the export as 4760.00 always. It it's 4760.6 from pl/sql then too it should be 4760.60 not 4760.6

I have tried pattern as custom pattern but it skipping the one decimal. Any help Please?




mohammed.sardar's picture
Joined: Aug 24 2014 - 11:55pm
Last seen: 7 years 5 months ago

Add #,##0.00 to the Pattern field in your Text Field Properties.

Or in the jrxml like....

<textField isStretchWithOverflow="true" pattern="#,##0.00">

jasperUser12 - 8 years 12 months ago

0 Answers:

No answers yet