Search code examples
jasper-reportsireport

Format String to Number iReport


i want to generate raport in ireport with existing database. I have fields in strings $F{Price} and varible $V{SumPrice} in strings too, and need to convert to integer and sum whole column with field Price

Can in do it in ireport ? I dont have access to the database.


Solution

  • You should set $V{SumPrice} "Variable class" property to java.lang.Integer and "Variable Expression" property to Integer.parseInt($F{Price}).