水晶报表问题,请高手指点!!

z52040355 2011-03-02 05:13:58
问题一:
报这个错不知道什么原因,请高手解答。
16:48:59,796 WARN com.crystaldecisions.reports.reportdefinition.ReportDocument:? - Failed to open export options stream
16:48:59,859 ERROR com.crystaldecisions.reports.formatter.a.c:? - Export Supervisor: fail to load exporter (stack trace follows). This warning is only a problem if the exporter that failed to load is supported in a given project.daviss.jeff.cellexporter.CellExporter
java.lang.ClassNotFoundException: daviss.jeff.cellexporter.CellExporter
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1360)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1206)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at com.crystaldecisions.reports.formatter.a.c.char(Unknown Source)
at com.crystaldecisions.reports.formatter.a.c.case(Unknown Source)
at com.crystaldecisions.reports.formatter.a.c.for(Unknown Source)
at com.businessobjects.reports.sdk.b.i.do(Unknown Source)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(Unknown Source)
……
……
at java.lang.Thread.run(Thread.java:619)


问题二:
报表源为JDBC (JNDI)连接,生成报表后,用jsp页面展示该报表报错:
16:50:56,609 ERROR com.crystaldecisions.reports.reportdefinition.datainterface:? - com.crystaldecisions.reports.reportdefinition.datainterface.h: 登录错误: THIN 驱动程序中不支持为空的用户或口令
16:50:56,609 ERROR com.crystaldecisions.reports.reportdefinition.datainterface:? - Failed to open connection (Connection: databaseType=JDBC (JNDI) serverName=jdbc:oracle:thin:@192.168.100.230:1521:xxxxxx state=closed databaseDriverName=crdb_jdbc.dll).
com.crystaldecisions.reports.queryengine.bl: 登录错误: THIN 驱动程序中不支持为空的用户或口令
at com.crystaldecisions.reports.queryengine.driverImpl.o.if(Unknown Source)
at com.crystaldecisions.reports.queryengine.av.new(Unknown Source)
at com.crystaldecisions.reports.queryengine.av.byte(Unknown Source)
at com.crystaldecisions.reports.reportdefinition.datainterface.b.a(Unknown Source)
at com.crystaldecisions.reports.reportdefinition.datainterface.b.a(Unknown Source)
at com.crystaldecisions.reports.reportdefinition.datainterface.b.a(Unknown Source)
at com.crystaldecisions.reports.reportdefinition.datainterface.b.if(Unknown Source)
at com.crystaldecisions.reports.reportdefinition.datainterface.j.a(Unknown Source)
at com.businessobjects.reports.sdk.b.e.a(Unknown Source)
at com.businessobjects.reports.sdk.b.e.if(Unknown Source)
……
……
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.sql.SQLException: THIN 驱动程序中不支持为空的用户或口令


java 代码如下:
String report = "test.rpt";
ReportClientDocument reportClientDoc = new ReportClientDocument();
reportClientDoc.open(report, OpenReportOptions._openAsReadOnly);
IReportSource reportSource = reportClientDoc.getReportSource();
CrystalReportViewer viewer = new CrystalReportViewer();
viewer.setReportSource(reportSource);
ConnectionInfos connections = new ConnectionInfos();
ConnectionInfo connection = new ConnectionInfo();
connection.setUserName("autocn");
connection.setPassword("123");
connections.add(connection);
viewer.setDatabaseLogonInfos(connections);
viewer.setHasLogo(true);
viewer.setHasExportButton(true);
viewer.setHasPrintButton(true);
viewer.setHasRefreshButton(true);
viewer.setPrintMode(CrPrintMode.ACTIVEX);
viewer.setOwnPage(true);
viewer.processHttpRequest(request,response,getServletConfig().getServletContext(),null);


以上两个错误同时报出,第一个错误貌似影响不大,主要是第二个问题,哪位大侠帮着解决一下。jsp可以显示报表,但是是静态的报表,现在不知道为什么报表不能与数据库交互,报错THIN 驱动程序中不支持为空的用户或口令,我明明有connection.setUserName()和setPassword()啊,请高手解答!

...全文
3450 点赞 收藏 6
写回复
6 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
xiaofengcan123 2013-11-13
我也遇到同样的以一个问题了,貌似没啥影响,但是老是报异常很不爽,不知楼主解决了没?如果解决了跪求共享一下!谢谢!
回复
z52040355 2011-03-04
4楼的方法不行,ReportDocument中获取不到getReportSource()方法,也就获取不到报表源。


String report = "test.rpt";
ReportClientDocument reportClientDoc = new ReportClientDocument();
//以只读方式打开报表
reportClientDoc.open(report, OpenReportOptions._openAsReadOnly);
//获取报表源
IReportSource reportSource = reportClientDoc.getReportSource();
CrystalReportViewer viewer = new CrystalReportViewer();
//使用查看器set报表源,查看报表
viewer.setReportSource(reportSource);
回复
z52040355 2011-03-03
点击刷新按钮可以解决第二个问题,
java.lang.ClassNotFoundException: daviss.jeff.cellexporter.CellExporter
刷新依然存在。
回复
z52040355 2011-03-03
貌似没什么问题,我点击刷新按钮就可以与数据库交互了。
回复
阿双2009 2011-03-03
ReportClientDocument? 是ReportDocument吧??

不懂jsp..


viewer.setReportSource(reportSource);
这句放在最后试试。。
回复
相关推荐
发帖
图表区
创建于2007-09-28

4810

社区成员

.NET技术 图表区
申请成为版主
帖子事件
创建了帖子
2011-03-02 05:13
社区公告
暂无公告