I have this part of jasper reports markup:
<band height="15">
<property name="com.jaspersoft.studio.layout"/>
<staticText>
<reportElement x="0" y="0" width="220" height="15"/>
<textElement textAlignment="Left" verticalAlignment="Top">
<font fontName="Arial" size="10"/>
</textElement>
<text>First band</text>
</staticText>
<textField textAdjust="StretchHeight" isBlankWhenNull="true">
<reportElement x="235" y="0" width="320" height="15">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement textAlignment="Left" verticalAlignment="Top">
<font fontName="Arial" size="10"/>
</textElement>
<textFieldExpression><Some data that big enough to fit more than one row></textFieldExpression>
</textField>
</band>
<band height="15">
<staticText>
<reportElement x="0" y="0" width="220" height="15"/>
<textElement textAlignment="Left" verticalAlignment="Top">
<font fontName="Arial" size="10"/>
</textElement>
<text>Second band</text>
</staticText>
<textField textAdjust="StretchHeight" isBlankWhenNull="true">
<reportElement x="235" y="0" width="320" height="15">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement textAlignment="Left" verticalAlignment="Top">
<font fontName="Arial" size="10"/>
</textElement>
<textFieldExpression><Second band data></textFieldExpression>
</textField>
</band>
Problem is that when value of textField in first band is too long (for example 130 symbols), I see that spacing between last row of textField in first band and first row of textField in second band is smaller than usual spacing
Here the example:
Image example
How can I make it usual-sized?
I tried to set PositionType to Float and splitType to Prevent, so it was like this:
<band height="15" splitType="Prevent">
<property name="com.jaspersoft.studio.layout"/>
<staticText>
<reportElement x="0" y="0" width="220" height="15"/>
<textElement textAlignment="Left" verticalAlignment="Top">
<font fontName="Arial" size="10"/>
</textElement>
<text>First band</text>
</staticText>
<textField textAdjust="StretchHeight" isBlankWhenNull="true">
<reportElement x="235" y="0" width="320" height="15">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<property name="positionType" value="Float"/>
</reportElement>
<textElement textAlignment="Left" verticalAlignment="Top">
<font fontName="Arial" size="10"/>
</textElement>
<textFieldExpression><Some data that big enough to fit more than one row></textFieldExpression>
</textField>
</band>
<!-- The same thing I did to second band -->
But nothing changed((
New contributor
Никита Каргин is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.