The Ad Hoc editor includes a menu item to change the data format displayed in the report. The format masks that are available in this menu are defined in adhoc_masks.properties. This file is typically found in ...jasperserver-proWEB-INFbundlesadhoc_masks.properties
Modify the adhoc_masks.properties file and restart the server. Data format masks are numbered consecutively (starting with dec_0 through dec_9). If you wish to insert a new data format mask between existing entries, you will need to renumber existing entries.
For example, if you want the option to display numbers up to four decimal places, you would add a format mask as shown below in key ADH_100_MASK_dec_1:
ADH_100_MASK_dec_0 = #,##0.00
ADH_100_MASK_dec_1 = #,##0.0000
ADH_100_MASK_dec_2 = 0
ADH_100_MASK_dec_3 = $#,##0.00;($#,##0.00)
ADH_100_MASK_dec_4 = $#,##0;($#,##0)
Once the server is restarted, end-users will be able to select the data format mask to display four decimal places:
Reference: JasperServer Pro Administrator Guide, Section 9.2.3.2 Changing Data Format Masks.
Potential Issues explained or resolved through this configuration capability
- Fields being read as a different type even though they are declared differently. For Example:
- Integer field being treated as BigDecimal even though it is defined as java.lang.Integer
Note: Applies to JasperServer Pro v3+
Recommended Comments
There are no comments to display.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now