我希望在Jaspersoft Studio的报告中插入来自数据库的数据.
该JPG图像都在现场保存在MySQL imgdata类型LONGBLOB.
我试图把这个表达式放在Image元素中:
$F{imgdata}MyUtil.getInputStream($F{imgdata})在第一种情况下,我收到此错误:
net.sf.jasperreports.engine.JRException: net.sf.jasperreports.engine.JRException: Unknown image source class [B
Run Code Online (Sandbox Code Playgroud)
......在第二种情况下,这个错误:
net.sf.jasperreports.engine.JRException:
net.sf.jasperreports.engine.fill.JRExpressionEvalException: Error
evaluating expression : Source text :
MyUtil.getInputStream($F{imgdata})
Run Code Online (Sandbox Code Playgroud)
我的问题:如何将数据库中的图像插入到JasperReports的报告中?