I've had this situation not only in Jasper but also in Crystal. The error says that is a conversion type error. Like if you declared variable "value" as object or didn't declared a variable type to it and then you are trying to assign and integer to that variable. While you are in the software (Jaspersoft Studio or Crystal Reports) that creates reports it solves automatically different variable types if it can be converted to another type. For example, if you pass a text that is a number, most of the time the software accept it, but outside the software (like in B4J) it doesn't accept it. I can't guarantee that I will look into it ASAP because that would be a lie. I'm going to give it a look later, and hopefully give you a answer soon enough.
Visual Basic auto convert variables when it can be converted. However C# or Java does not auto convert variables to another type even if both values are the same (10 or "10" e.g.)