Java Reference
In-Depth Information
<text>
<![CDATA[staticText element stretchType is
"RelativeToTallestObject"]]>
</text>
</staticText>
<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>
</frame>
</band>
</detail>
</jasperReport>
In this JRXML template, we replaced the <elementGroup> element in the previous
example with a <frame> element and slightly modified some of the element's sizes.
We added a <reportElement> sub-element to the <frame> element to set the frame
to have a light gray background. We then added a <box> element to set the frame's
element. Since <reportElement> and <box> apply for the whole frame, they are
applied to all the elements inside the frame. After compiling and filling the above
JRXML template, it should generate a report like the following:
The code to generate the report is similar to what we have seen before. Therefore, we
are not showing it.
Hiding Repeated Values
Sometimes report elements can have the same value over and over. For example, the
report we created in the Grouping Report Data section is sorted by model number.
For aircraft with the same model, we see the model number repeated over and over
again. Perhaps, the report would be easier to read if we printed the model number
 
Search WWH ::




Custom Search