Use case
The requirement in this case is to have the % symbol next to a value displayed in an Ad Hoc report. Since Ad Hoc reports utilize the formatting masks provided by Java, when adding the '%' to a number patter the value will automatically get multiplied by 100. When database data is already stored as a percentage value this additional multiplication is redundant and needs to be avoided.
Solution
The basic procedure to add/configure Ad Hoc data format masks is outlined in JRS Admin Guide (see the "Setting Data Format Masks" at the bottom of the page below):
When using the % sign in a pattern mask, it needs to be additionally put into single quotes to avoid the multiplication of the original value, e.g.:
ADH_100_MASK_int_4 = #.##0'%'
ADH_100_MASK_dec_5 = #,##0.00'%'
Here's how it looks in the adhoc_masks.properties file:
For more details on Java pattern masks see the official documentation:
https://docs.oracle.com/javase/tutorial/i18n/format/decimalFormat.html
-----------------------------
Ref. case #01450871
Recommended Comments
There are no comments to display.