Stretch with overflow Detail band not working as expected

后端 未结 2 1384
春和景丽
春和景丽 2021-01-23 05:34

I have a simple report. It has two bands title and detail. In the Title I have a static text, in the Detail I have one textField.

The tex

相关标签:
2条回答
  • 2021-01-23 05:35

    In the same band if there are more items and you want to have all same stretched. It has to be set to all of them to stretchType="RelativeToTallestObject" and isStretchWithOverflow="true".

        <textField isStretchWithOverflow="true" pattern="###0">
                <reportElement stretchType="RelativeToTallestObject" x="1576" y="0" width="91" height="20"/>
                <textElement textAlignment="Center"/>
                <textFieldExpression class="java.lang.Long"><![CDATA[$F{count_tohfa}]]></textFieldExpression>
            </textField>
    
    0 讨论(0)
  • 2021-01-23 05:55

    Report property: Add this

    net.sf.jasperreports.text.save.line = true
    
    net.sf.jasperreports.export.html.wrap.break.word = true
    

    Source: Word Wrapping HTML versus PDF

    0 讨论(0)
提交回复
热议问题