Jump to content
We've recently updated our Privacy Statement, available here ×

Currency symbol improperly displayed in JasperReports Server


TheBigM60

Recommended Posts

Environment: iReport v4.7.0, JasperReports Server v4.7

Report 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

  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

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

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

  • 4 weeks later...

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

  • 10 months later...

In /WEB-INF/applicationContext.xml

Search 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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...