Jump to content
Changes to the Jaspersoft community edition download ×

Different number formatting on different stations


J_N

Recommended Posts

I have number formatting problem

- the same jasper report run on different PC stations, formats the number fields differently.

- I did extensive search - traced the whole report from jasper source code and found out this

- The problem lies in JRFillTextField.java class (jasperreports version 1.3.3), line 377:

 

textFieldValue = format.format(textFieldValue);

 

Few examples of textFieldValue variable (before calling format method, after on one station, after on other station):

1 -> 1.00 1,00

19047.6 -> 19,047.60 19047,60

 

All text fields have the same pattern #,##0.00

 

I wonder what can affect java.text.Format class, format method to behave like this.

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

My exploration went on and I ended in class net.sf.jasperreports.engine.util.DefaultFormatFactory on line

 

format = NumberFormat.getNumberInstance(locale);

 

locale is in both cases the same, but the resulting format is different. I can't go on further, because java.text.NumberFormat class ends in java runtime.

 

The mystery remains.

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