Jump to content

How to format Currency with space as thousands separator?


nick_45

Recommended Posts

I' 'm trying to format a field as currency like this R1 234.95 using a space as a thousand separator using this format mask R# ##0.00;R# ##0.00 but it will not show the space. If I use a comma it works fine.

I've played around with locale settings and my region settings even tried this expression that I inserted in text field expression 

new java.text.DecimalFormat("R# ##0.00").format($F{Nett_Due_value}) 

which I found on this forum which gave mixed results.

I'm at a loss. any help please

Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

java.text.NumberFormat.getCurrencyInstance(new Locale("pt","br")).format($F{Nett_Due_value}.doubleValue()).replace("$ ", "").
You can try using this, just need to change the expression to your locale and then mess with the replace. I would suggest using substring to formmat the way you want.

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