A report template is composed of sections. Sections are portions of the report that
have a specified height and can contain report objects like lines, rectangles, images or
text fields. In JasperReports terminology, sections are also called
Bands
. In the context of this document these two terms are
interchangeable.
There are several types of sections each of them serving a specific purpose.
Sections
Title
The title section. This section appears only once at the beginning of the report.
Page Header
The page header section. This section appears at the beginning of each page.
Column Header
The column header section. This section appears at the beginning of each column. If the report has only one column defined, then column header and footer sections are ignored.
Detail
The detail section. This section is repeated for each line of data supplied by the report's data source.
Column Footer
The column footer section. This section appears at the bottom of each column. If the report's column count is 1, then column header and footer sections are ignored.
Page Footer
The page footer section. This section appears at the bottom of each page.
Last Page Footer
The last page footer section. This section replaces the regular page footer on the last page of the report. This might not be the very last page of the document in case the summary section is also present. This section is sometimes useful when summary information has to be displayed at the bottom of the last page.
Summary
The summary section. This section appears only once at the end of the report.
Background
The background section. The background section is displayed on every page and cannot overflow to the next page. Elements placed on this section are evaluated at page initialization time and are displayed in the background. All other page objects are displayed on top of the background objects. This section is useful for creating page watermarks.
Group Header
The group header section. This section is introduced by a report group (Section 6.11, “Groups”). The group header section is printed above the detail section each time the grouping expression changes its value. In case that more than one group is defined, the group header is printed in the order of group definition.
Group Footer
The group footer section. This section is introduced by a report group (Section 6.11, “Groups”). The group footer section is printed below the detail section before the value of the grouping expression changes. The group footer is always printed for the last line of data in data source. In case that more than one group is defined, the group footer is printed in the reverse order of group definition.
No Data
The no data section. This section is printed when the When No Data Print
report property is set to No Data Section
.
Section Properties
Height
Height of the section specified in report units.
Print When Expression
A Boolean expression that determines whether the section should be printed or not.
Split Allowed
A flag indicating whether the section is allowed to split when it does not fit on the current page. If true, the section will be transferred to the next page. Note that in case the section does not fit on the next page then the section will be split regardless of the flag's value.