Hello, in iReport i want to read with the "substring" function a part from a text field like: $F{Textfeld}.substring(5, 9) For example of "10000 015" the part "015" "20000 023" the part "023" "30000 057" the part "057" After that I want to create a variable $V{Sum} (typ = java.lang.Integer, calculation = sum), to convert the results in a number and create a sum. In the example it is 95. Unfortunately, it has been abort with "java.lang.String cannot be cast to java.lang.Number". But what is wrong with it? Markus