2
回答
Jaspersoft IReport Html中显示图片正常,但是导出excel和pdf时都报错!
利用AWS快速构建适用于生产的无服务器应用程序,免费试用12个月>>>   

使用 Jaspersoft IReport Designer 5.5.0 开发的报表

显示在html正常显示图片。

但是导出Excel和Pdf时就报错!

导出pdf时报:

[2013-12-26.16:13:58]ERROR - [common.util.report.WabappJasperPrint:line 112]导出报表异常
net.sf.jasperreports.engine.JRException: Byte data not found at : ../dishpic/722f464f-3883-42aa-901f-21706da9c582.png
	at net.sf.jasperreports.repo.RepositoryUtil.getBytesFromLocation(RepositoryUtil.java:324)
	at net.sf.jasperreports.engine.JRImageRenderer.getImageData(JRImageRenderer.java:493)
	at net.sf.jasperreports.engine.RenderableUtil.getOnErrorRendererForImageData(RenderableUtil.java:287)
	at net.sf.jasperreports.engine.export.JRPdfExporter.exportImage(JRPdfExporter.java:1239)
	at net.sf.jasperreports.engine.export.JRPdfExporter.exportElements(JRPdfExporter.java:854)
	at net.sf.jasperreports.engine.export.JRPdfExporter.exportFrame(JRPdfExporter.java:2664)
	at net.sf.jasperreports.engine.export.JRPdfExporter.exportElements(JRPdfExporter.java:862)
	at net.sf.jasperreports.engine.export.JRPdfExporter.exportFrame(JRPdfExporter.java:2664)
	at net.sf.jasperreports.engine.export.JRPdfExporter.exportElements(JRPdfExporter.java:862)
	at net.sf.jasperreports.engine.export.JRPdfExporter.exportPage(JRPdfExporter.java:818)
	at net.sf.jasperreports.engine.export.JRPdfExporter.exportReportToStream(JRPdfExporter.java:695)
	at net.sf.jasperreports.engine.export.JRPdfExporter.exportReport(JRPdfExporter.java:396)
	at common.util.report.ReportPdfExporter.export(ReportPdfExporter.java:21)
	at common.util.report.WabappJasperPrint._exportFile(WabappJasperPrint.java:126)
	at common.util.report.WabappJasperPrint.exportFile(WabappJasperPrint.java:109)
	at common.util.report.WabappJasperPrint.renderOutputModel(WabappJasperPrint.java:104)
	at com.hestia.mosa.report.service.ReportJasperServiceImpl.mosaMenuInfo(ReportJasperServiceImpl.java:2328)
	at com.hestia.mosa.report.service.ReportJasperServiceImpl.navigation(ReportJasperServiceImpl.java:155)
	at com.hestia.mosa.report.controller.ReportJasperController.report(ReportJasperController.java:25)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at org.springframework.web.servlet.mvc.multiaction.MultiActionController.invokeNamedMethod(MultiActionController.java:471)
	at org.springframework.web.servlet.mvc.multiaction.MultiActionController.handleRequestInternal(MultiActionController.java:408)
	at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
	at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:771)
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:716)
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:647)
	at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:552)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at common.filter.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:149)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
	at org.apache.catalina.core.StandardContextValve.__invoke(StandardContextValve.java:123)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
	at java.lang.Thread.run(Thread.java:722)
导出Excel时报:
[2013-12-26.16:24:25]ERROR - [common.util.report.WabappJasperPrint:line 112]导出报表异常
net.sf.jasperreports.engine.JRException: The cell cannot be added
	at net.sf.jasperreports.engine.export.JRXlsExporter.exportImage(JRXlsExporter.java:1564)
	at net.sf.jasperreports.engine.export.JRXlsAbstractExporter.exportPage(JRXlsAbstractExporter.java:1191)
	at net.sf.jasperreports.engine.export.JRXlsAbstractExporter.exportReportToStream(JRXlsAbstractExporter.java:983)
	at net.sf.jasperreports.engine.export.JRXlsAbstractExporter.exportReport(JRXlsAbstractExporter.java:629)
	at common.util.report.ReportXlsExporter.export(ReportXlsExporter.java:31)
	at common.util.report.WabappJasperPrint._exportFile(WabappJasperPrint.java:126)
	at common.util.report.WabappJasperPrint.exportFile(WabappJasperPrint.java:109)
	at common.util.report.WabappJasperPrint.renderOutputModel(WabappJasperPrint.java:104)
	at com.hestia.mosa.report.service.ReportJasperServiceImpl.mosaMenuInfo(ReportJasperServiceImpl.java:2328)
	at com.hestia.mosa.report.service.ReportJasperServiceImpl.navigation(ReportJasperServiceImpl.java:155)
	at com.hestia.mosa.report.controller.ReportJasperController.report(ReportJasperController.java:25)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at org.springframework.web.servlet.mvc.multiaction.MultiActionController.invokeNamedMethod(MultiActionController.java:471)
	at org.springframework.web.servlet.mvc.multiaction.MultiActionController.handleRequestInternal(MultiActionController.java:408)
	at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
	at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:771)
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:716)
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:647)
	at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:552)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at common.filter.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:149)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
	at org.apache.catalina.core.StandardContextValve.__invoke(StandardContextValve.java:123)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
	at java.lang.Thread.run(Thread.java:722)
Caused by: net.sf.jasperreports.engine.JRException: Byte data not found at : ../dishpic/722f464f-3883-42aa-901f-21706da9c582.png
	at net.sf.jasperreports.repo.RepositoryUtil.getBytesFromLocation(RepositoryUtil.java:324)
	at net.sf.jasperreports.engine.JRImageRenderer.getImageData(JRImageRenderer.java:493)
	at net.sf.jasperreports.engine.RenderableUtil.getOnErrorRendererForImageData(RenderableUtil.java:287)
	at net.sf.jasperreports.engine.export.JRXlsExporter.exportImage(JRXlsExporter.java:1336)
	... 48 more



希望有明白的给点意见。感谢了


这种导出时会报:

[2013-12-27.10:38:45]ERROR - [common.util.report.WabappJasperPrint:line 112]导出报表异常
net.sf.jasperreports.engine.JRException: The cell cannot be added
	at net.sf.jasperreports.engine.export.JRXlsExporter.exportImage(JRXlsExporter.java:1564)
	at net.sf.jasperreports.engine.export.JRXlsAbstractExporter.exportPage(JRXlsAbstractExporter.java:1191)
	at net.sf.jasperreports.engine.export.JRXlsAbstractExporter.exportReportToStream(JRXlsAbstractExporter.java:983)
	at net.sf.jasperreports.engine.export.JRXlsAbstractExporter.exportReport(JRXlsAbstractExporter.java:629)
	at common.util.report.ReportXlsExporter.export(ReportXlsExporter.java:31)
	at common.util.report.WabappJasperPrint._exportFile(WabappJasperPrint.java:126)
	at common.util.report.WabappJasperPrint.exportFile(WabappJasperPrint.java:109)
	at common.util.report.WabappJasperPrint.renderOutputModel(WabappJasperPrint.java:104)
	at com.hestia.mosa.report.service.ReportJasperServiceImpl.mosaMenuInfo(ReportJasperServiceImpl.java:2171)
	at com.hestia.mosa.report.service.ReportJasperServiceImpl.navigation(ReportJasperServiceImpl.java:155)
	at com.hestia.mosa.report.controller.ReportJasperController.report(ReportJasperController.java:25)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at org.springframework.web.servlet.mvc.multiaction.MultiActionController.invokeNamedMethod(MultiActionController.java:471)
	at org.springframework.web.servlet.mvc.multiaction.MultiActionController.handleRequestInternal(MultiActionController.java:408)
	at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
	at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:771)
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:716)
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:647)
	at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:552)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at common.filter.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:149)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
	at java.lang.Thread.run(Thread.java:722)
Caused by: net.sf.jasperreports.engine.JRException: Image read failed.
	at net.sf.jasperreports.engine.util.JRJdk14ImageReader.readImage(JRJdk14ImageReader.java:73)
	at net.sf.jasperreports.engine.util.JRImageLoader.loadAwtImageFromBytes(JRImageLoader.java:167)
	at net.sf.jasperreports.engine.JRImageRenderer.getImage(JRImageRenderer.java:407)
	at net.sf.jasperreports.engine.JRImageRenderer.getDimension(JRImageRenderer.java:482)
	at net.sf.jasperreports.engine.RenderableUtil.getOnErrorRendererForDimension(RenderableUtil.java:264)
	at net.sf.jasperreports.engine.export.JRXlsExporter.exportImage(JRXlsExporter.java:1339)
	... 47 more






举报
pengcheng_1024
发帖于4年前 2回/2K+阅

以下是问题补充:

  • @pengcheng_1024 :感谢帮个忙啊,实质是不知道怎么搞的啦!!!! (4年前)
  • @pengcheng_1024 :我现在想即便这里有空白,我也能导出内容,只是有空白的导不出内容就是了,希望有懂的给予指导。感谢了 (4年前)
共有2个答案 最后回答: 4年前

上面导出PDF和EXCEL的问题是图片路径出错!!!

数据库中存存的图片路径是"../dishpic/722f464f-3883-42aa-901f-21706da9c582.png",浏览器上能够显示,但在导出PDF和EXCEL时路径就不对了。

IReport设计出来使用图片控件;使用的是相对路径。

我在判断程序如果是导出excel或是pdf时我就从新做了个模板,将上面的属性 “Is  Lazy” 属性给取消掉,使用的路径就是绝对路径,这样就能够正常导出Excel了。


但是我又遇到问题啦!!!!

[2013-12-27.10:38:45]ERROR - [common.util.report.WabappJasperPrint:line 112]导出报表异常
net.sf.jasperreports.engine.JRException: The cell cannot be added
	at net.sf.jasperreports.engine.export.JRXlsExporter.exportImage(JRXlsExporter.java:1564)
	at net.sf.jasperreports.engine.export.JRXlsAbstractExporter.exportPage(JRXlsAbstractExporter.java:1191)
	at net.sf.jasperreports.engine.export.JRXlsAbstractExporter.exportReportToStream(JRXlsAbstractExporter.java:983)
	at net.sf.jasperreports.engine.export.JRXlsAbstractExporter.exportReport(JRXlsAbstractExporter.java:629)
	at common.util.report.ReportXlsExporter.export(ReportXlsExporter.java:31)
	at common.util.report.WabappJasperPrint._exportFile(WabappJasperPrint.java:126)
	at common.util.report.WabappJasperPrint.exportFile(WabappJasperPrint.java:109)
	at common.util.report.WabappJasperPrint.renderOutputModel(WabappJasperPrint.java:104)
	at com.hestia.mosa.report.service.ReportJasperServiceImpl.mosaMenuInfo(ReportJasperServiceImpl.java:2171)
	at com.hestia.mosa.report.service.ReportJasperServiceImpl.navigation(ReportJasperServiceImpl.java:155)
	at com.hestia.mosa.report.controller.ReportJasperController.report(ReportJasperController.java:25)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at org.springframework.web.servlet.mvc.multiaction.MultiActionController.invokeNamedMethod(MultiActionController.java:471)
	at org.springframework.web.servlet.mvc.multiaction.MultiActionController.handleRequestInternal(MultiActionController.java:408)
	at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
	at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:771)
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:716)
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:647)
	at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:552)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at common.filter.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:149)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
	at java.lang.Thread.run(Thread.java:722)
Caused by: net.sf.jasperreports.engine.JRException: Image read failed.
	at net.sf.jasperreports.engine.util.JRJdk14ImageReader.readImage(JRJdk14ImageReader.java:73)
	at net.sf.jasperreports.engine.util.JRImageLoader.loadAwtImageFromBytes(JRImageLoader.java:167)
	at net.sf.jasperreports.engine.JRImageRenderer.getImage(JRImageRenderer.java:407)
	at net.sf.jasperreports.engine.JRImageRenderer.getDimension(JRImageRenderer.java:482)
	at net.sf.jasperreports.engine.RenderableUtil.getOnErrorRendererForDimension(RenderableUtil.java:264)
	at net.sf.jasperreports.engine.export.JRXlsExporter.exportImage(JRXlsExporter.java:1339)
	... 47 more
这个问题是这样的:

导出下面格式的内容就不报错。

但是导出下面的格式内容就有问题!!

我现在想即便这里有空白,我也能导出内容,只是有空白的导不出内容就是了,希望有懂的给予指导。感谢了


顶部