ll.rodrigo Posted April 23, 2016 Share Posted April 23, 2016 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 More sharing options...
Solution kkriplani Posted April 25, 2016 Solution Share Posted April 25, 2016 Hi,This is a long shot but have you tried;"R$ " + $F{soma}As for the pattern of Soma, you can click on the field and give it a pattern in the property.Regards,KKriplani Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now