日期:2014-05-18  浏览次数:20778 次

jsp 如何调用ireport生成的jrxml文件
请给个比较全的示例代码,ireport没用过 分不多了 谢谢了

------解决方案--------------------
Java code
JasperReport jasperReport = JasperCompileManager.compileReport(jrxmlPath);
JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, new HashMap(), connection);
JasperExportManager.exportReportToHtmlFile(jasperPrint, htmlPath);
JasperViewer view = new JasperViewer(jasperPrint, false);
view.pack();
view.setVisible(true);