Java Reference
In-Depth Information
stretch type will stretch the appropriate element to match the height of the tallest
object in the element's group. All elements between <elementGroup> and </
elementGroup> are in the same group. The <elementGroup> element can have other
nested <elementGroup> elements. If no <elementGroup> element is defined inside a
<band> , then all elements inside the band are considered to be in the same group.
Using the <frame> Element
JasperReports 1.1 introduced a new report element, the <frame> element. The
<frame> element allows us to group elements together and give them a common
look. For example, we can set the background color of the frame and it will be
inherited across all elements contained within the frame. Frames also provide a
straightforward way of placing a border around multiple report elements. The
following JRXML template is a new version of the example in the previous section. It
has been modified to illustrate the use of frames.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE jasperReport PUBLIC "//JasperReports//DTD Report Design//EN"
<jasperReport name="FrameDemo">
<field name="lots_of_data" class="java.lang.String"/>
<band height="60">
<reportElement x="0" y="0" width="555" height="60"
mode="Opaque" backcolor="lightGray"/>
<box border="Dotted" padding="1"/>
<textField isStretchWithOverflow="true">
<reportElement x="0" y="0" width="100" height="24"/>
<box border="Thin"/>
<textFieldExpression class="java.lang.String">
<textField isStretchWithOverflow="true">
<reportElement x="101" y="0" width="150" height="24"/>
<box border="Thin"/>
<textFieldExpression class="java.lang.String">
<reportElement width="290" y="0" x="252" height="24"
<box border="Thin"/>
Search WWH ::

Custom Search