【发布时间】:2014-01-01 09:06:05
【问题描述】:
我有一个带有 2 个背靠背子报表的主详细信息 vertically 他们没有太多空间,因为主报表很长....我在两个子报表中都指定了 FLOAT 属性,当两者的数据都填充在空间中,将其分配给IREPORT,但是当它们有很多行时,我的意思是3 or more rows 第二个子报表Materiales 与下一个组件重叠......我想如果某些子报表需要更多空间它会向下推下一个组件。 TRABAJOS REALIZADOS 进入 Frame with Float property 但未向下推,框架保持位置并被 Materiales sub-report.. 重叠
我的 ireport 设计。
my source code some tags are ommited by brevity
<detail>
<band height="770" splitType="Stretch">
.... others tags ommited by brevity
<frame>
<reportElement positionType="Float" x="0" y="401" width="554" height="70"/>
<subreport runToBottom="false">
<reportElement positionType="Float" x="1" y="1" width="553" height="69"/>
<dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($F{munichs})]]></dataSourceExpression>
<subreportExpression class="java.io.InputStream"><![CDATA[$P{SUBREPORT_EXPRESSION}]]></subreportExpression>
</subreport>
</frame>
<frame>
<reportElement positionType="Float" x="2" y="472" width="551" height="128"/>
<subreport runToBottom="false">
<reportElement positionType="Float" x="1" y="44" width="545" height="83"/>
<dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($F{venices})]]></dataSourceExpression>
<subreportExpression class="java.io.InputStream"><![CDATA[$P{SUBREPORT_EXPRESSION_SECOND_REPORT}]]></subreportExpression>
</subreport>
</frame>
<frame><!--this frame is not pushed down and gets overlapped...-->
<reportElement positionType="Float" x="0" y="599" width="554" height="171"/>
<rectangle>
<reportElement x="2" y="1" width="180" height="20"/>
</rectangle>
<staticText>
<reportElement x="2" y="1" width="178" height="20"/>
<textElement/>
<text><![CDATA[TRABAJOS PENDIENTES]]></text>
</staticText>
<rectangle>
<reportElement x="2" y="21" width="550" height="38"/>
</rectangle>
<textField>
<reportElement x="3" y="21" width="551" height="38"/>
<textElement/>
<textFieldExpression class="java.lang.String"><![CDATA[$F{observations}]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="2" y="64" width="100" height="20"/>
<textElement/>
<text><![CDATA[FIRMA OPERADOR: ]]></text>
</staticText>
<staticText>
<reportElement x="333" y="64" width="107" height="20"/>
<textElement/>
<text><![CDATA[CONFORME CLIENTE:]]></text>
</staticText>
<image>
<reportElement x="442" y="63" width="22" height="22"/>
<imageExpression class="java.io.InputStream"><![CDATA[$F{sign}]]></imageExpression>
</image>
<staticText>
<reportElement x="188" y="90" width="66" height="20"/>
<textElement/>
<text><![CDATA[FIRMA Y DNI:]]></text>
</staticText>
<image>
<reportElement x="257" y="89" width="22" height="22"/>
<imageExpression class="java.io.InputStream"><![CDATA[$F{conformity}]]></imageExpression>
</image>
<image>
<reportElement x="281" y="89" width="264" height="32"/>
<imageExpression class="java.io.InputStream"><![CDATA[$F{imageForSign}]]></imageExpression>
</image>
<textField>
<reportElement x="2" y="122" width="543" height="49"/>
<textElement/>
<textFieldExpression class="java.lang.String"><![CDATA[$P{lopd}]]></textFieldExpression>
</textField>
</frame>
</band>
</detail>
我的IReport image
我的 PDF 重叠..
1:
【问题讨论】:
-
你的帖子不是很清楚。
-
将子报表 positionType 的属性设置为 Float。它会解决你的问题。
-
请不要在问题标题中加上“已解决”。改为接受答案。 (您可以接受自己的答案,但只能在 48 小时后。)
标签: java pdf jasper-reports reporting overlapping