2006 IR Open Dicussion Posted September 5, 2006 Share Posted September 5, 2006 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 More sharing options...
myphuong Posted September 27, 2011 Share Posted September 27, 2011 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 More sharing options...
lknueve Posted September 28, 2011 Share Posted September 28, 2011 put the following in your text field expression -> substituting the name of the field for your field name -> change the separators as needed new java.text.DecimalFormat("#,##0.00").format($F{eventDurationInHours}) Link to comment Share on other sites More sharing options...
morfeo630 Posted April 7, 2022 Share Posted April 7, 2022 Hi,I think the best solution is to:set the reporta variable $P{REPORT_LOCALE} andset the Text field atribute "pattern".In your case:Parameter value: $P{REPORT_LOCALE} = new Locale("fr")[/code] 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_codesBest regards, 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