我有一份主要报告,在主要报告中有一份子报告称:
<detail>
<band height="50">
<subreport>
<reportElement x="0" y="1" width="802" height="49" isPrintInFirstWholeBand="true" isPrintWhenDetailOverflows="true"/>
<subreportParameter name="project_id">
<subreportParameterExpression><![CDATA[$P{project_id}]]></subreportParameterExpression>
</subreportParameter>
<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
<subreportExpression><![CDATA["subs/Project_planned.jasper"]]></subreportExpression>
</subreport>
</band>
</detail>
Run Code Online (Sandbox Code Playgroud)
子报表中存在一个问题,因为详细信息区域中的文本字段在多个页面上分开,看起来不太好.是否有一个选项可以防止文本字段在使用属性时分割为多个页面isStretchWithOverflow
文本字段的当前代码
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement stretchType="RelativeToBandHeight" x="555" y="0" width="99" height="21" isPrintInFirstWholeBand="true" forecolor="#000000"/>
<box leftPadding="2">
<topPen lineWidth="1.0" lineColor="#000000"/>
<leftPen lineWidth="1.0" lineColor="#000000"/>
<bottomPen lineWidth="1.0" lineColor="#000000"/>
<rightPen lineWidth="1.0" lineColor="#000000"/>
</box>
<textElement verticalAlignment="Middle">
<paragraph lineSpacing="Single"/>
</textElement>
<textFieldExpression><![CDATA[$F{logic}]]></textFieldExpression>
</textField>
Run Code Online (Sandbox Code Playgroud)
它的外观示例(抱歉缺少数据):

Jac*_*oen 12
是的,但在文本字段上没有.对于文本字段所在的波段,您可以将"分割类型"设置为Prevent.如果你在Detail Band上设置它并且该行需要溢出到下一页,它会将整行移动到下一页.
| 归档时间: |
|
| 查看次数: |
20760 次 |
| 最近记录: |