|
|
关于怎么整合网上到处都是例子、apache也有比较详细的例子说明,我是参考这篇文章的http://www.blogjava.net/sterning/archive/2008/01/02/172317.html我使用他的源码HTML预览时还是不能正常显示,images/px(网上的一种解决方案)都有还是不能正常显示,无奈之下只有查看源代码了。
Struts2对通过JasperReportsResult.java类的doExecute方法对JasperReport进行了简单的整合,这个方法对JasperReport的API简单的包装(车轮理论^_^)
<div style="border-right: #cccccc 1px solid; padding-right: 5px; border-top: #cccccc 1px solid; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left: #cccccc 1px solid; width: 98%; padding-top: 4px; border-bottom: #cccccc 1px solid; background-color: #eeeeee;"> JasperReport jasperReport = (JasperReport) JRLoader.loadObject(systemId);
jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, stackDataSource); |
|