Ireport 详细信息带中的行错误
Ireport Line Error in Detail Band
这是报告输出,我们开始在详细信息带中应用单行,当项目名称字段在 iReport 中得到 Stretch with Overflow 时,单行仍然存在并提供溢出区域的间隙。
任何解决方案都会有所帮助。
在reportElement
上使用stretchType属性,需要适配其他元素溢出(line
,textField
ecc)。根据您想要实现的目标设置值 RelativeToBandHeight
或 RelativeToTallestObject
。
拉伸类型
NoStretch - The report element preserves its original specified
height.
RelativeToBandHeight - The report element adapts its height to
match the new height of the report section it is placed on, which has
been affected by stretch.
RelativeToTallestObject - Report elements
can be made to automatically adapt their height to fit the amount of
stretch suffered by the tallest element in the group that they are
part of.
如果你正在画一条线 es.
<line>
<reportElement stretchType="RelativeToBandHeight" x="1" y="0" width="1" height="20" uuid="2d923fed-08e1-4304-8b06-ef9894bd8181"/>
</line>
但是我不喜欢画线,而是在报告的文本字段上使用边框和填充。
例子
<textField>
<reportElement stretchType="RelativeToBandHeight" x="0" y="0" width="100" height="20" uuid="45c316a5-4e29-4247-acb5-2f551e9a8f47"/>
<box topPadding="2" leftPadding="2" bottomPadding="2" rightPadding="2">
<pen lineWidth="0.25"/>
<topPen lineWidth="0.25"/>
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textFieldExpression><![CDATA[$F{field}]]></textFieldExpression>
</textField>
这是报告输出,我们开始在详细信息带中应用单行,当项目名称字段在 iReport 中得到 Stretch with Overflow 时,单行仍然存在并提供溢出区域的间隙。
任何解决方案都会有所帮助。
在reportElement
上使用stretchType属性,需要适配其他元素溢出(line
,textField
ecc)。根据您想要实现的目标设置值 RelativeToBandHeight
或 RelativeToTallestObject
。
拉伸类型
NoStretch - The report element preserves its original specified height.
RelativeToBandHeight - The report element adapts its height to match the new height of the report section it is placed on, which has been affected by stretch.
RelativeToTallestObject - Report elements can be made to automatically adapt their height to fit the amount of stretch suffered by the tallest element in the group that they are part of.
如果你正在画一条线 es.
<line>
<reportElement stretchType="RelativeToBandHeight" x="1" y="0" width="1" height="20" uuid="2d923fed-08e1-4304-8b06-ef9894bd8181"/>
</line>
但是我不喜欢画线,而是在报告的文本字段上使用边框和填充。
例子
<textField>
<reportElement stretchType="RelativeToBandHeight" x="0" y="0" width="100" height="20" uuid="45c316a5-4e29-4247-acb5-2f551e9a8f47"/>
<box topPadding="2" leftPadding="2" bottomPadding="2" rightPadding="2">
<pen lineWidth="0.25"/>
<topPen lineWidth="0.25"/>
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textFieldExpression><![CDATA[$F{field}]]></textFieldExpression>
</textField>