Java Reference
In-Depth Information
<![CDATA[$F{lots_of_data}]]>
</textFieldExpression>
</textField>
<staticText>
<reportElement width="300" y="0" x="252" height="24"
stretchType="RelativeToTallestObject"/>
<box border="Thin"/>
<text>
<![CDATA[staticText element stretchType is
"RelativeToTallestObject"]]>
</text>
</staticText>
</elementGroup>
<staticText>
<reportElement width="250" y="25" x="0" height="24"
positionType="Float"/>
<box border="Thin"/>
<text>
<![CDATA[This text is here to stretch the band a bit
more.]]>
</text>
</staticText>
</band>
</detail>
</jasperReport>
After compiling the above JRXML template, and filling the resulting Jasper template,
we should see a report like the following:
Once again we decided to display borders around every element, to make it clear
where an element's boundaries are. As we can see in the screenshot, the static text is
stretched to match the height of the tallest object. This is because we set the value of
the stretchType property of <reportElement> to be RelativeToTallestObject .
Notice the <elementGroup> element in the above JRXML template. The purpose of
this element is to group elements together so that we can better control the behavior
of report elements when one of them stretches. The RelativeToTallestObject
 
Search WWH ::




Custom Search