iReport 中的组 header 中的字段未按预期伸展并溢出

Field does not stretch as expected with overflow in group header in iReport

我在 ireport 中有一个文本字段,最长可达 500 个字符,我已将它放在 header 组中,并设置为在 overflow.But 拉伸时拉伸,它与字段重叠below.How我可以让它不与其他字段重叠吗

这就是设计::

从jasper的角度来看,问题不在于它没有拉伸,问题在于下面的字段不允许移动。

所以让我们告诉他们移动,将 JRElement 上的 positionType 设置为 Float

<textField>
    <reportElement positionType="Float" x="0" y="0" width="100" height="20" uuid="e439886e-6e58-450d-b87f-70ba76233fbc"/>
    <textElement verticalAlignment="Middle"/>
    <textFieldExpression><![CDATA[$F{YourFieldsThatNeedToMove}]]></textFieldExpression>
</textField>

不同的positionType是:

FixRelativeToTop - (default) The current report element simply ignores what happens to the other section elements and tries to conserve the y offset measured from the top of its parent report section

Float - The element floats in its parent section if it is pushed downward by other elements found above it. It tries to conserve the distance between it and the neighboring elements placed immediately above it

FixRelativeToBottom - If the height of the parent report section is affected by elements that stretch, the current element tries to conserve the original distance between its bottom margin and the bottom of the band