关于LES网页端ireport打印
Demo 代码:
@SkipValidation
@Action(value = "jit_receive_status", results = { @Result(type = "ireport", location = "reports/ireport/test.jasper")
})
public String print() {
String resultSign = SUCCESS;
try {
reportParams = new HashMap<String, Object>();
reportParams.put("qrCode", QrUtil.genQrCode("123123", 300, 300));
reportFields = new ArrayList<Map<String,Object>>();
Map<String,Object> vo = new HashMap<String, Object>();
vo.put("city", "1");
vo.put("id", "1");
vo.put("name", "1");
vo.put("street", "1");
reportFields.add(vo);
vo = new HashMap<String, Object>();
vo.put("city", "中国1111");
vo.put("id", "中国111");
vo.put("name", "11");
vo.put("street", "11");
reportFields.add(vo);
} catch (Exception e) {
addActionError("打印失败,请重试!");
}
return resultSign;
}