Print a QR Code in JasperReports 5.6.1

2019-07-24 18:52发布

I get the following error when trying to print a QR code in JasperReports

net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file:
1. com.google.zxing.client.j2se.MatrixToImageWriter cannot be resolved to a type
                value = com.google.zxing.client.j2se.MatrixToImageWriter.toBufferedImage(new com.google.zxing.qrcode.QRCodeWriter().encode("((java.lang.String)field_RECSEQ.getValue())",com.google.zxing.BarcodeFormat.QR_CODE,300 ,150 )); //$JR_EXPR_ID=10$

1条回答
啃猪蹄的小仙女
2楼-- · 2019-07-24 19:18

I got this working by adding the core.jar and javase.jar to build path.

查看更多
登录 后发表回答