Stretch overflow not working in excel jasper report

后端 未结 3 1987
滥情空心
滥情空心 2020-12-19 23:53

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 e

相关标签:
3条回答
  • 2020-12-20 00:06

    I just got same issue and i solved it.

    its simple. just open your report properties and set page height to 999999. convert again and see its just solved

    0 讨论(0)
  • 2020-12-20 00:12

    It works perfect in HTML, but during export in EXCEL format I get problem. I looked stretch sample from jasper reports demo/samples folder and found out solution. I set horizontal alighment textfield parameter to "justify" and it will work in Excel and look perfect. Seems that without this parameter stretch does not work during export to Excel. Thanks for the help, user1390785 !

    0 讨论(0)
  • 2020-12-20 00:33

    you should do the following to get it working:

    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.
    0 讨论(0)
提交回复
热议问题