Hi I´m using this code to send a media field to JasperReport. It works fine on Developer but I get an error from Server. Nothing is shown in the server log.
The error means that the object you create on the client (javax.imageio.ImageIO) cannot be sent to the Servoy server, because it is not serializable. That problem will not occur in developer…
could you fix the problem and if yes how?
Does the codeline [net.sf.jasperreports.engine.util.JRImageLoader.loadImage((byte) $F{logoInquilino})] from Rob help you?
Where do I have to integrate the code in iReport?
jasantana:
Sorry Thomas, before I had the last reply I fixed it by getting the image in the jasper query.
No problem Juan!
I get it running by myself .
Normally I also set an image on a report by a subreport and a sql query, but I have a couple of especial reports with data from foundsets. For this I have to set the image by a parameter value because of the missing unique id.
In the iReport properties of the parameter “IMAGE” I set the Default Value Expression to “net.sf.jasperreports.engine.util.JRImageLoader.loadImage((byte) $P{IMAGE})” and now it works on the server-client environment.