拉伸溢出在excel jasper报告中不起作用 [英] Stretch overflow not working in excel jasper report

查看:189
本文介绍了拉伸溢出在excel jasper报告中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 jasper 报告将报告导出到Excel( XLSX 格式),但是会出现拉伸问题当文本字段溢出时。
textfield 的值大于 textfield size时,我只得到空单元格。
我试图使用这些参数,但它没有帮助我:

I am trying to export report to Excel (XLSX format) using jasper report, but get problems with stretching when text field is overflow. I get just empty cells when value of textfield is bigger than textfield size. I tried to use these parameters, but it isn't helping me:

<property name="net.sf.jasperreports.export.xls.collapse.row.span" value="true"/>
<property name="net.sf.jasperreports.print.keep.full.text" value="true"/>
<property name="net.sf.jasperreports.export.xls.detect.cell.type" value="true"/>
<property name="net.sf.jasperreports.export.xls.wrap.text" value="true"/>
<property name="net.sf.jasperreports.export.xls.auto.fit.row" value="true"/>
<property name="net.sf.jasperreports.export.xls.auto.fit.column" value="true"/>

以下是屏幕截图:
http://clip2net.com/s/39cbljj

HTML中看起来不错:

http:/ /c2n.me/39cyhRf

有人知道如何解决这个问题吗?
谢谢。

Does anybody know how to fix this? Thanks.

推荐答案

您应该执行以下操作以使其正常工作:

you should do the following to get it working:


  1. 设置 isStretchWithOverflow =true获取详细信息
    band上的所有 TextField元素(它将修复长文本
    值的剪切)

  2. 所有<设置 stretchType =RelativeToBandHeight / strong>详细信息带上的TextField元素(它将修复空单元格的问题 - 所有TextFields将以相同的高度呈现)

  3. 设置属性<属性名=net.sf.jasperreports.export.xls.auto.fit.rowvalue =true/> 每个TextField上的
    可能有很长的值。关键是属性net.sf.jasperreports.export.xls.auto.fit.row仅适用于元素级别。另请注意,此属性不适用于合并单元格。

  1. Set isStretchWithOverflow="true" for all TextField elements on Detail band (it will fix cutting of long text values)
  2. Set stretchType="RelativeToBandHeight" for all TextField elements on Detail band (It will fix the issue with empty cells - all TextFields will be rendered with the same height)
  3. set the property <property name="net.sf.jasperreports.export.xls.auto.fit.row" value="true"/> on each TextField which may have long value. The point is that property net.sf.jasperreports.export.xls.auto.fit.row works on Element level only.Also please note that this property won't work for merged cells.

这篇关于拉伸溢出在excel jasper报告中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆