How to convert value 1000.00 to 100,00.00?

0

I already try to change the pattern format for the number and use some pattern expression but nothing happen .. ELPP

kuhazwan7's picture
Joined: Aug 4 2019 - 6:19pm
Last seen: 2 days 21 hours ago

4 Answers:

0

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 

C-Box

 

C-Box's picture
1743
Joined: Jul 19 2006 - 5:58pm
Last seen: 32 min 32 sec ago
0

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   

kuhazwan7's picture
Joined: Aug 4 2019 - 6:19pm
Last seen: 2 days 21 hours ago
0

No problem, nice that it works now! :-)

regards from sunny Dresden/Germany

C-Box

C-Box's picture
1743
Joined: Jul 19 2006 - 5:58pm
Last seen: 32 min 32 sec ago
0

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.

anji.viper's picture
Joined: Mar 8 2017 - 2:59am
Last seen: 3 days 20 hours ago
Feedback
randomness