简体   繁体   English

图片未显示在DynamicReports中

[英]Image not displaying in DynamicReports

I have just downloaded the DynamicReports libraries from http://dynamicreports.sourceforge.net/index.html . 我刚刚从http://dynamicreports.sourceforge.net/index.html下载了DynamicReports库。 I'm currently using a Servlet under Tomcat 5.5. 我目前在Tomcat 5.5下使用Servlet。

I have taken two of their sample codes and everything works fine when report is generated as PDF. 我已经使用了两个示例代码,当将报告生成为PDF时,一切正常。

Problem occurs when the report is generated as HTML. 当报告生成为HTML时,会出现问题。 All image spacers are not getting loaded, therefore getting X in browser. 没有加载所有图像垫片,因此在浏览器中获得X。 Again, reports are being viewed using Servlet. 同样,正在使用Servlet查看报告。

I checked the html source code and below are the image paths: 我检查了html源代码,下面是图像路径:

<img alt="" src="nullpx" style="width: 60px; height: 1px;"/>

The data is being displayed properly, only problem are images. 数据显示正确,唯一的问题是图像。

Anyone knows is DynamicReports is using an Image Servlet? 有人知道DynamicReports正在使用图像Servlet吗? I could not find any configuration for this on their website. 我在他们的网站上找不到任何配置。

Thanks in advance. 提前致谢。

I figured this out. 我想通了。 You actually need an Image Servlet. 您实际上需要一个Image Servlet。 It basically uses the same Image Servlet that comes I believe with Jasper Reports. 它基本上使用与Jasper Reports相同的Image Servlet。

There is a complete sample Servlet. 有一个完整的Servlet示例。 I just had to modify the images path and it generated an awesome report!!!. 我只需要修改图像路径,它就会生成一个很棒的报告!!! Below is link: 以下是链接:

http://sourceforge.net/tracker/?func=detail&aid=3065668&group_id=313754&atid=1320348 http://sourceforge.net/tracker/?func=detail&aid=3065668&group_id=313754&atid=1320348

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM