ireport如何拼接sql
ireport如何拼接sql?
解决方法:
1.ireport的sql
select * from emp as e $P!{whereSQL};
2.java代码
HashMap parameters = new HashMap();
parameters.put("whereSQL", "where id=3");
JasperRunManager.runReportToPdfStream(reportStream,
servletOutputStream, parameters, connection);