Har*_*wan 4 report jasper-reports ireport
当页面中的最后一个条目太长时,它会在下一页显示,当它显示所有表格行都缺失时.
这是结果:

如何将最后一条记录(第26条)移至下一页,或如何显示该行?
您可以在staticText元素后面放置没有文本的textField元素.您应该stretchType使用RelativeToTallestObject值设置属性,并isPrintWhenDetailOverflows使用true值设置属性.
例子:
<detail>
<band height="20" splitType="Stretch">
<staticText>
<reportElement stretchType="RelativeToTallestObject" x="0" y="0" width="100" height="20" isPrintWhenDetailOverflows="true"/>
<box>
<leftPen lineWidth="1.0"/>
<bottomPen lineWidth="1.0"/>
<rightPen lineWidth="1.0"/>
</box>
<textElement/>
<text><![CDATA[]]></text>
</staticText>
<textField>
<reportElement stretchType="RelativeToTallestObject" x="0" y="0" width="100" height="20"/>
<box>
<leftPen lineWidth="1.0"/>
<bottomPen lineWidth="1.0"/>
<rightPen lineWidth="1.0"/>
</box>
<textElement/>
<textFieldExpression><![CDATA[$F{id}]]></textFieldExpression>
</textField>
Run Code Online (Sandbox Code Playgroud)
因此,您将在第二页获得垂直边框.

添加第二页之前的结果staticText是(第二页的垂直边框不存在):

| 归档时间: |
|
| 查看次数: |
6911 次 |
| 最近记录: |