我有一个主报告,在主报告中有一个子报告,称为:
<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>
子报表中存在问题,因为详细信息带中的文本字段被拆分在多个页面上,看起来不太好。使用该属性时是否有防止文本字段拆分为多个页面的选项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>
外观示例(抱歉缺少数据):