插入一个图片,属性image Expression 设置如下
com.google.zxing.client.j2se.MatrixToImageWriter.toBufferedImage(newcom.google.zxing.qrcode.QRCodeWriter().encode(newString($P{no}.getBytes(“UTF-8”),”ISO-8859-1”),com.google.zxing.BarcodeFormat.QR_CODE,100,100))
$P{no} :是传入二维码内容
前提:引入谷歌zxing jar包
<dependency>
<groupId>com.google.zxing</groupId>
<artifactId>core</artifactId>
<version>2.2</version>
</dependency>
<dependency>
<groupId>com.google.zxing</groupId>
<artifactId>javase</artifactId>
<version>2.2</version>
</dependency>
重启运行:很遗憾报错,没能运行成功,没时间研究,大体思路这样,以后再继续查找原因验证!
随手记,待整理:
resetType : 页面 page
variable Expression : 选择要合计的字段
variable class : BigDecimal
calculation : 统计函数 sum
Horizontal Alignment : right 内容右对齐(金额需要右对齐)
Vertical Alignment : Middle 内容居中
Blank when null : 为空时不打印
number 或 Date类型 有pattern 属性,可以设置千分位,或显示格式
表格线设置: 选中表格,全选,右键第一个