I want insert images from database in details band in my report in Jaspersoft Studio.
The JPG-images are saved in MySQL in the field imgdata of type longblob.
I`v tried to put this expressions in Image element:
$F{imgdata}
MyUtil.getInputStream($F{imgdata})
In the first case I get this error:
net.sf.jasperreports.engine.JRException: net.sf.jasperreports.engine.JRException: Unknown image source class [B
... and in second case this error:
net.sf.jasperreports.engine.JRException:
net.sf.jasperreports.engine.fill.JRExpressionEvalException: Error
evaluating expression : Source text :
MyUtil.getInputStream($F{imgdata})
My question: How to insert images from database into JasperReports's report?