采用jasperreports用HTML方式打印报表,图片展示不出来,求救!!!
来源:互联网 发布:网络模块套什么定额 编辑:程序博客网 时间:2024/05/29 05:53
使用jasperreports中的JRHtmlExporter类,用HTML浏览报表出现图片展示不出来问题,
private void exportToHTML(HttpServletRequest request,
HttpServletResponse response, JasperPrint jasperPrint)
throws JRException, IOException {
JRHtmlExporter exporter = new JRHtmlExporter();
exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
exporter.setParameter(JRExporterParameter.OUTPUT_WRITER, response.getWriter());
// 是否用图片来对齐 如果true的话会用图片来填充空白区域 这里要用false
exporter.setParameter(JRHtmlExporterParameter.IS_USING_IMAGES_TO_ALIGN, false);
// 是否隐藏空的字符 这里要用true,否则在界面上空对象会显示为null
exporter.setParameter(JRHtmlExporterParameter.IS_WRAP_BREAK_WORD, true);
// 图片路径
exporter.setParameter(JRHtmlExporterParameter.IMAGES_URI, "/images/");
exporter.exportReport();
}
HTML中的图片展示不出来,查看图片的属性,
路径是http://10.38.144.159:8080/custcare/custsvc/commonbusiness/nullimg_0_0_0
本地采用绝对路径,后面也会跟一个img_0_0_0,
求各位大侠的帮助,需要在Java中设置什么属性吗?
- 采用jasperreports用HTML方式打印报表,图片展示不出来,求救!!!
- ireport html图片显示不出来
- 解决jasperreports报表在HTML页面显示的PX图片的问题
- ssh三大框架简单整合,struts2整合JasperReport报表、图表,解决HTML显示图片不出来,PDF中文不显示的问题
- 惠普打印机打印不出来
- Java+JasperReports非web工程的报表导出与打印
- TextView显示html文件中的图片,为什么显示不出来
- html插入图片后在网页显示不出来
- 【润乾报表】html类型引用图片导出打印问题
- jasperreports中图片的填充方式
- Struts2整合jasperreport html展示图片不显示的解决办法
- 关于Ireport导出HTML图片不展示问题
- jasperreports制作报表(导出pdf excel html)
- jasperreports制作报表(导出pdf excel html)
- 使用jasperreports制作报表(导出pdf excel html)
- Web 方式打印报表
- 图片显示不出来
- html+css图片展示
- ecshop常用修改
- 黑马程序员_反射机制
- ffmpeg转换参数和对几种视频格式的转换分析
- C++中const使用详解
- 记录Extjs中各种小例子
- 采用jasperreports用HTML方式打印报表,图片展示不出来,求救!!!
- Eclipse 各版本的源代码(在线版)
- jvm的stack和heap,JVM内存模型,垃圾回收策略,分代收集,增量收集
- 数论小知识
- 让windows cmd 支持utf8中文
- Linux C中strcpy , strncpy , strlcpy 的区别
- Id唯一,Date选最近一次的信息
- Android推送实现方案探讨
- 微软TechEd 2012开幕在即,八折团体购票即送Surface平板