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

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()啊,请高手解答!

...全文
3580 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
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);
这句放在最后试试。。

4,816

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 图表区
社区管理员
  • 图表区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧