How to convert value 1000.00 to 100,00.00?
Posted on September 10, 2019 at 7:35pm
I already try to change the pattern format for the number and use some pattern expression but nothing happen .. ELPP
Posted on September 10, 2019 at 10:51pm
Don't know your pattern requirement but why it should be 10x so much like before?!?!?
So in Germany we have a decimal separator (the comma ",") and a thousands separator (the dot ".") - so vice versa as in java/english countries by default.
The number "one thousand" (1000) is represented as string "1.000,00" when I use this as pattern;: "###,###.00"
So not sure what you actually want - just take a look here. (https://docs.oracle.com/javase/tutorial/i18n/format/decimalFormat.html) and be aware that your textfield is also passed as BigDecimal/double value from your database query and not as casted string.
hth + regards
Posted on September 10, 2019 at 11:36pm
yeah it works tq sir :) .. i have casted the field that i want and it automatically convert the class from String to BigDecimal and i can set the pattern that provided by Jaspersoft Studio..
p/s: sorry for my bad english peace from Malaysia
Posted on September 10, 2019 at 11:43pm
No problem, nice that it works now! :-)
regards from sunny Dresden/Germany
Posted on September 12, 2019 at 11:04pm
I use pattern "#,##0.00" in Jasper studio but the number will appear as 1,000.00 in certain cases, and in others it will appear as "1 000,00".. Such as France because France uses an empty space as the thousands separator and comma as decimal separator.