Jump to content
We've recently updated our Privacy Statement, available here ×

BigDecimal Currency Money Charts Ireport


ll.rodrigo
Go to solution Solved by kkriplani,

Recommended Posts

Hi i have a chart where i want to show a label in this format "R$1.235,00" .At the chart i have a field  $F{soma} that is a BigDecimal. If i print just $F{soma} i'm getting something like: "1.235,00".And like  i said i need it like "R$1.235,00".

I've tred  this:

new java.text.DecimalFormat("R$ #,##0.00").format($F{soma})[/code]

             But then i get this exception:

java.lang.String cannot be cast to java.lang.Number[/code]

 

How can i solve that, can anyone help?Thanks.

MYsql database and the type of soma is in java class is Bigdecimal, and at the database it says decimal(19,2).

I was told that printing just $F{soma} it shouldn't format the soma as "1.235,00". So i gues it have something to do with my database.

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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