Hello all.
I am creating an ad-hoc view from Jaspersoft server. I have selected fields from a domain and now I am trying to create a calculated field from the ad-hoc view.
My calculation requires dividing a field value by 86400 and i want the exact decimal value. But when I display it as columns, it always rounds off to 2 digits. I do not want to round it off. Below is the screenshot of how I add the calculated field. The Summary Calculation is set to none.
Why does it give the only limited data formats? I need more decimal values.
Kindly help.
1 Answer:
Actually, the very last formatting option, which just shows three places, will actually show from three to sixteen, but the number used as an example only has two decimal places.
Here are some more details if the provided formats are not enough:
You can do further configuration of formatting in Ad Hoc by modifying the file WEB-INF/bundles/adhoc_masks.properties.
Here are the formats for decimal types:
ADH_100_MASK_dec_0 = #,##0.00 ADH_100_MASK_dec_1 = 0 ADH_100_MASK_dec_2 = $#,##0.00;($#,##0.00) ADH_100_MASK_dec_3 = $#,##0;($#,##0) ADH_100_MASK_dec_4 = $#,##0.000#############
Decimal formats are specified by the Java DecimalFormat class; here's some documentation:
https://docs.oracle.com/javase/tutorial/i18n/format/decimalFormat.html