关于ireport的datasource的以及和Struts2整合的疑问。
我在ireport设计工具的datasource中使用的是数据库
而且这个数据源是可以导出成xml文档的:
导出后的xml文档如下:
<?xml version="1.0"?><!-- iReport connections --><iReportConnectionSet> <iReportConnection name="Empty datasource" connectionClass="com.jaspersoft.ireport.designer.connection.JREmptyDatasourceConnection"> <connectionParameter name="records"><![CDATA[1]]></connectionParameter> </iReportConnection> <iReportConnection name="Sample Database (HSQLDB test)" connectionClass="com.jaspersoft.ireport.samples.db.SampleDatabaseConnection"> <connectionParameter name="ServerAddress"><![CDATA[]]></connectionParameter> <connectionParameter name="SavePassword"><![CDATA[true]]></connectionParameter> <connectionParameter name="Url"><![CDATA[jdbc:hsqldb:hsql://127.0.0.1/]]></connectionParameter> <connectionParameter name="JDBCDriver"><![CDATA[org.hsqldb.jdbcDriver]]></connectionParameter> <connectionParameter name="Database"><![CDATA[]]></connectionParameter> <connectionParameter name="Password"><![CDATA[]]></connectionParameter> <connectionParameter name="Username"><![CDATA[sa]]></connectionParameter> </iReportConnection> <iReportConnection name="Test" connectionClass="com.jaspersoft.ireport.designer.connection.JDBCConnection"> <connectionParameter name="ServerAddress"><![CDATA[]]></connectionParameter> <connectionParameter name="SavePassword"><![CDATA[true]]></connectionParameter> <connectionParameter name="Url"><![CDATA[jdbc:jtds:sqlserver://localhost/pcbsyn]]></connectionParameter> <connectionParameter name="JDBCDriver"><![CDATA[net.sourceforge.jtds.jdbc.Driver]]></connectionParameter> <connectionParameter name="Database"><![CDATA[]]></connectionParameter> <connectionParameter name="Password"><![CDATA[711]]></connectionParameter> <connectionParameter name="Username"><![CDATA[sa]]></connectionParameter> </iReportConnection></iReportConnectionSet>
<action name="toXls" class="com.yaxing.action.userListAction" method="execute"> <result name="success" type="jasper"> <param name="location">report1.jasper</param> <param name="dataSource">userList</param> <param name="format">XLS</param> </result> <result name="error"> /info_error.jsp </result> </action>
java.lang.ClassNotFoundException: org.apache.poi.ss.usermodel.Sheet
这些个小红XX 咋回事呢?
PDF 页面则没这个问题。
谢谢。~
[解决办法]
木用过ireport,帮顶。