Eclipse开发工具+水晶报表,动态数据可以显示,但动态图片不行并且老报错

gxsted 2017-11-16 03:24:07
代码:
<%@page import="com.JRC.util.JRC_ResultSet_DataSource" %>
<%@page import="com.crystaldecisions.report.web.viewer.*"%>
<%@page import="com.crystaldecisions.reports.sdk.*" %>
<%@page import="com.crystaldecisions.sdk.occa.report.reportsource.*" %>
<%@page import="com.crystaldecisions.sdk.occa.report.data.*" %>
<%@page import="com.crystaldecisions.sdk.occa.report.lib.ReportSDKExceptionBase" %>
<%@page language="java" import="java.io.*"%>
<%@page trimDirectiveWhitespaces="true" %>

<%
String query = "select t.fuserid fbh,t.fusername fname,t.fpwdemail fmail," +
" 'http://192.168.11.15:8000/PICTURE3/7464.JPG' imgpath from t_vfyuser t ";
if(!jrcd.isReportSourceInSession(query,"reportSource",session))
response.sendRedirect("error.html");
CrystalReportViewer crViewer=new CrystalReportViewer();
//跟中文显示有关
crViewer.setOwnPage(true);
crViewer.setOwnForm(true);
//设置显示、隐藏组树按钮
//crViewer.setHasToggleGroupTreeButton(true);
crViewer.setDisplayGroupTree(false);
crViewer.setPrintMode(CrPrintMode.ACTIVEX);
crViewer.setReportSource(session.getAttribute("reportSource"));
crViewer.processHttpRequest(request,response,this.getServletConfig().getServletContext(),null);

%>

报错内容:
严重: Servlet.service() for servlet jsp threw exception
java.lang.IllegalStateException: getOutputStream() has already been called for this response
at org.apache.catalina.connector.Response.getWriter(Response.java:611)
at org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade.java:198)
at org.apache.jasper.runtime.JspWriterImpl.initOut(JspWriterImpl.java:125)
at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:118)
at org.apache.jasper.runtime.PageContextImpl.release(PageContextImpl.java:188)
at org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContext(JspFactoryImpl.java:118)
at org.apache.jasper.runtime.JspFactoryImpl.releasePageContext(JspFactoryImpl.java:77)
at org.apache.jsp.crystalreportviewers11.crystalimagehandler_jsp._jspService(crystalimagehandler_jsp.java:73)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:386)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:619)

如果rpt里面没有显示动态图片情况下,水晶报表都可以正常显示,有图片就会报错
水晶报表里面的图片是获取结果集中的图片路径字段,并赋值给水晶报表上的图片对象的,是这样设置的
...全文
126 回复 点赞 打赏 收藏 举报
写回复
回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
相关推荐
发帖
Eclipse
加入

5.8w+

社区成员

Java Eclipse
申请成为版主
帖子事件
创建了帖子
2017-11-16 03:24
社区公告
暂无公告