TheBigM60 Posted July 5, 2013 Share Posted July 5, 2013 Environment: iReport v4.7.0, JasperReports Server v4.7Report developed in iReport uses Currency Pattern "¤ #,##0.00".It properly displays the "$" sign when run in preview mode from iReport.It properly displays the "$" sign when run from the Repository Navigator in iReport in the Report Viewer.When logged into JasperReports via a browser, the currency placeholder "¤" from the Currency Pattern is displayed.Is this a bug? Link to comment Share on other sites More sharing options...
TheBigM60 Posted July 5, 2013 Author Share Posted July 5, 2013 I worked around the problem. The solution dawned on me as I was looking at an old Oracle DiscovererBI Report. There should be no space between the "$" currency symbol and the first digit!The problem source is the Currency Pattern "¤ #,##0.00" in iReport. So I used the Custom Pattern option "¤#,##0.00" without the space. It works as expected in iReport Preview mode and running it from the Repository Navigator.However, it still did not work when running it logged into JasperReports Server via a browser.I went back to iReport and changed the pattern from "Currency" to "Custom" specifying the Custom Pattern to be "$#,##0.00" and it now properly displays the "$" when logged into JasperReports Server. Link to comment Share on other sites More sharing options...
lucianc Posted July 5, 2013 Share Posted July 5, 2013 Try the following: edit WEB-INF/applicationContext-security.xml, look for userLocalesList and change the first value from "en" to "en_US".HTH,Lucian Link to comment Share on other sites More sharing options...
TheBigM60 Posted July 8, 2013 Author Share Posted July 8, 2013 Many thanks for your response! EN_US vs EN is important!BTW, exactly where is that location?Is it in the iReport 4.7.0 folder structure on the PC?Or is it in the JasperReport Server 4.7.0 folder structure on the server?Does it need to be changed in both installations? Link to comment Share on other sites More sharing options...
TheBigM60 Posted July 30, 2013 Author Share Posted July 30, 2013 With regards to my original post, my requirements are to be able to display currency as US dollar ("$") amounts when executing the report in JapserReports Server 4.7 and when the report is exported "as XSLX" from Jasper.After trying several suggestions found elsewhere in this community, including the suggestion of copying the "adhoc_masks.properties" to "adhoc_masks_en_US.properties" there's only one solution I've found that works. It's found in my original post above:Go back to iReport and change the pattern from "Currency" to "Custom" and specify the Custom Pattern to be "$#,##0.00; ($#,##0.00)" with the spaces removed from between the "$" and "#".The report will now properly display the "$" when executed from your JasperReports Server browser session and exported "as XSLX". Link to comment Share on other sites More sharing options...
alison.oxton Posted June 12, 2014 Share Posted June 12, 2014 In /WEB-INF/applicationContext.xmlSearch for <util:map id="formatPatternsMap">Add the following keys to section ‘formatPatternsMap’: <entry key="¤ #,##0" value="$#,##0_);[Red]($#,##0)"/> <entry key="¤ #,##0.00" value="$#,##0.00_);[Red]($#,##0.00)"/> <entry key="¤ #,##0.0" value="$#,##0.00_);[Red]($#,##0.00)"/> <entry key="¤ #,##0;(¤ #,##0)" value="$#,##0_);[Red]($#,##0)"/> <entry key="#,##0 %" value="0%"/> <entry key="#,##0.00 %" value="0.00%"/> Link to comment Share on other sites More sharing options...
Recommended Posts
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