Jump to content
Changes to the Jaspersoft community edition download ×

How to change decimal and thousand separators


2006 IR Open Dicussion

Recommended Posts

By: Roberto Erausquin - robertoeh

How to change decimal and thousand separators

2006-05-09 13:11

Hello

 

I designed a report but need to change the decimal separator to "." and the thousand separator to ",". iReport is showing the separators like I want them but when I deploy to my application server, its using "," for decimals and "." for thousands

How can I change this settings? Something related to .properties files? How do I set this parameters in my application?

Link to comment
Share on other sites

  • 5 years later...
  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

 I have a same problem with you, but reverse with you. I want to format double value with pattern: commas for decimal separator, and dot for thousand separator. Can you or anyone help me? thanks very much!

Note: i want it still is double value, not change to String, :)



Post Edited by myphuong at 09/27/2011 10:36
Link to comment
Share on other sites

  • 10 years later...

Hi,

I think the best solution is to:

  1. set the reporta variable $P{REPORT_LOCALE} and
  2. set the Text field atribute "pattern".

In your case:

  1. Parameter value:  
    $P{REPORT_LOCALE} = new Locale("fr")[/code]

     

  2. Text field setup:
            <textField pattern="#,##0.00000;-#,##0.00000">                ...                <textFieldExpression><![CDATA[$F{myFieldNumber}]]></textFieldExpression>            </textField>[/code]

List of ISO 639-1 codes: https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes


Best regards,

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...