I have a jasper-report that has several subreports. Most of them work fine, but for some reason one of my subreports does not split if it becomes long enough to reach the end of the page, instead it jumps back up to the top of its detail section and continues writing there, overwriting the previous text. I can't see any difference between this subreport and the one that work right. Currently my project uses jasper-reports 1.2.5, but I tried upgrading to 4.0.1 (just for this one report) and the results were the same.
This is the section of jrxml where my subreport which doesn't work is included:
<subreport isUsingCache="true">
<reportElement
x="0"
y="172"
width="468"
height="21"
key="subreport-3"
positionType="Float"/>
<dataSourceExpression><![CDATA[$P{dataSourcePreviousYukonLicence}]]></dataSourceExpression>
<subreportExpression class="java.io.InputStream"><![CDATA[this.getClass().getResourceAsStream("/config/template/subreportPreviousYukonLicence2.jasper")]]></subreportExpression>
And this is the section for one that does work:
<subreport isUsingCache="true">
<reportElement
x="0"
y="43"
width="468"
height="21"
key="subreport-2"
positionType="Float"/>
<dataSourceExpression><![CDATA[$P{dataSourceConvictionHistory}]]></dataSourceExpression>
<subreportExpression class="java.io.InputStream"><![CDATA[this.getClass().getResourceAsStream("/config/template/subreportConvictionHistory.jasper")]]></subreportExpression>
The subreports themselves are very similarly designed, with all the bands having is isSplitAllowed="true"
, and they ues the same fonts and the same types of report elements.
If anyone has any ideas why one would split properly and the other not, your help woulb be much appreciated.