日期:2014-05-17 浏览次数:20924 次
Map parameters = new HashMap(); parameters.put("monthTime", monthTime); parameters.put("factoryNo", factoryNo); parameters.put("factoryName", factoryName); parameters.put("REPORT_CONNECTION", this.getConnection());//把子表连接作为参数传递 parameters.put("SUBREPORT_DIR",application.getRealPath("/WEB-INF/jasper/")+"\\");
InputStream reportStream = application.getResourceAsStream("produce_month_report.jasper"); byte[] bytes = JasperRunManager.runReportToPdf(reportStream, paras, con); response.setContentType("application/pdf;charset=gb2312"); response.setContentLength(bytes.length); response.getOutputStream().write(bytes, 0, bytes.length);
net.sf.jasperreports.engine.JRException: Could not load object from location : produce_month_report_main.jasper