Each report consists of several sections (bands). Each band has its particular location, signification, dimension, and can contain components. The height of the band is based on the component's dimension that it contains and can grow when the components are stretched.
Examples
Quick usage:
report() .title(cmp.text("This is a title band")) .pageHeader(cmp.text ("This is a page header band")) .pageFooter(cmp.text ("This is a page footer band"))Another example: BandReport
The band is printed on the first page and only once.
Configuration options
method | description |
---|---|
titleOnANewPage() | Prints the title band on a separate page |
setTitleOnANewPage(Boolean titleOnANewPage) | Sets whether or not the title band is printed on a separate page |
setTitleSplitType(SplitType splitType) | Sets the title band split type SplitType.PREVENT - prevents the band from splitting SplitType.STRETCH - the band can be split, but never within its declared height. SplitType.IMMEDIATE - the band can be split |
setTitleStyle(StyleBuilder style) | Sets a title band style |
title(ComponentBuilder<?, ?> ... components), addTitle(ComponentBuilder<?, ?> ... components) |
Adds components to the title band |
The band is printed on each page at the top of the page.
Configuration options
method | description |
---|---|
setPageHeaderSplitType(SplitType splitType) | Sets the page header band split type SplitType.PREVENT - prevents the band from splitting SplitType.STRETCH - the band can be split, but never within its declared height. SplitType.IMMEDIATE - the band can be split |
setPageHeaderStyle(StyleBuilder style) | Sets a page header band style |
pageHeader(ComponentBuilder<?, ?> ... components), addPageHeader(ComponentBuilder<?, ?> ... components) |
Adds components to the page header band |
The band is printed on each page at the bottom of the page.
Configuration options
method | description |
---|---|
setPageFooterSplitType(SplitType splitType) | Sets the page footer band split type SplitType.PREVENT - prevents the band from splitting SplitType.STRETCH - the band can be split, but never within its declared height. SplitType.IMMEDIATE - the band can be split |
setPageFooterStyle(StyleBuilder style) | Sets a page footer band style |
pageFooter(ComponentBuilder<?, ?> ... components), addPageFooter(ComponentBuilder<?, ?> ... components) |
Adds components to the page footer band |
The band is printed on each page at the top of the page and it's placed below the page header band.
Configuration options
method | description |
---|---|
setColumnHeaderSplitType(SplitType splitType) | Sets the column header band split type SplitType.PREVENT - prevents the band from splitting SplitType.STRETCH - the band can be split, but never within its declared height. SplitType.IMMEDIATE - the band can be split |
setColumnHeaderStyle(StyleBuilder style) | Sets a column header band style |
columnHeader(ComponentBuilder<?, ?> ... components), addColumnHeader(ComponentBuilder<?, ?> ... components) |
Adds components to the column header band |
The band is printed on each page at the bottom of the page and it's placed above the page footer band.
Configuration options
method | description |
---|---|
setColumnFooterSplitType(SplitType splitType) | Sets the column footer band split type SplitType.PREVENT - prevents the band from splitting SplitType.STRETCH - the band can be split, but never within its declared height. SplitType.IMMEDIATE - the band can be split |
floatColumnFooter() | Prints the column footer band at the bottom of the column |
setFloatColumnFooter(Boolean floatColumnFooter) | Sets whether or not the column footer band is printed at the bottom of the column |
setColumnFooterStyle(StyleBuilder style) | Sets a column footer band style |
columnFooter(ComponentBuilder<?, ?> ... components), addColumnFooter(ComponentBuilder<?, ?> ... components) |
Adds components to the column footer band |
The band is printed for each data group. It's placed above the grouped data and between the column header and footer.
method | description |
---|---|
setGroupHeaderSplitType(GroupBuilder<?> group, SplitType splitType) | Sets the group header band split type SplitType.PREVENT - prevents the band from splitting SplitType.STRETCH - the band can be split, but never within its declared height. SplitType.IMMEDIATE - the band can be split |
setGroupHeaderStyle(GroupBuilder<?> group, StyleBuilder style) | Sets a group header band style |
groupHeader(GroupBuilder<?> group, ComponentBuilder<?, ?> ... components), addGroupHeader(GroupBuilder<?> group, ComponentBuilder<?, ?> ... components) |
Adds components to the group header band |
The band is printed for each data group. It's placed below the grouped data and between the column header and footer.
method | description |
---|---|
setGroupFooterSplitType(GroupBuilder<?> group, SplitType splitType) | Sets the group footer band split type SplitType.PREVENT - prevents the band from splitting SplitType.STRETCH - the band can be split, but never within its declared height. SplitType.IMMEDIATE - the band can be split |
setGroupFooterStyle(GroupBuilder<?> group, StyleBuilder style) | Sets a group footer band style |
groupFooter(GroupBuilder<?> group, ComponentBuilder<?, ?> ... components), addGroupFooter(GroupBuilder<?> group, ComponentBuilder<?, ?> ... components) |
Adds components to the group footer band |
The band is printed for each record row in the data source and it's placed between the column header and footer band.
Configuration options
method | description |
---|---|
setDetailSplitType(SplitType splitType) | Sets the detail band split type SplitType.PREVENT - prevents the band from splitting SplitType.STRETCH - the band can be split, but never within its declared height. SplitType.IMMEDIATE - the band can be split |
setDetailStyle(StyleBuilder style) | Sets a detail band style |
detail(ComponentBuilder<?, ?> ... components), addDetail(ComponentBuilder<?, ?> ... components) |
Adds components to the detail band |
The band is printed for each record row in the data source and it's placed above the detail band.
Configuration options
method | description |
---|---|
setDetailHeaderSplitType(SplitType splitType) | Sets the detail header band split type SplitType.PREVENT - prevents the band from splitting SplitType.STRETCH - the band can be split, but never within its declared height. SplitType.IMMEDIATE - the band can be split |
setDetailHeaderStyle(StyleBuilder style) | Sets a detail header band style |
detailHeader(ComponentBuilder<?, ?> ... components), addDetailHeader(ComponentBuilder<?, ?> ... components) |
Adds components to the detail header band |
The band is printed for each record row in the data source and it's placed below the detail band.
Configuration options
method | description |
---|---|
setDetailFooterSplitType(SplitType splitType) | Sets the detail footer band split type SplitType.PREVENT - prevents the band from splitting SplitType.STRETCH - the band can be split, but never within its declared height. SplitType.IMMEDIATE - the band can be split |
setDetailFooterStyle(StyleBuilder style) | Sets a detail footer band style |
detailFooter(ComponentBuilder<?, ?> ... components), addDetailFooter(ComponentBuilder<?, ?> ... components) |
Adds components to the detail footer band |
The band is printed only on the last page at the bottom of the page.
Configuration options
method | description |
---|---|
setLastPageFooterSplitType(SplitType splitType) | Sets the last page footer band split type SplitType.PREVENT - prevents the band from splitting SplitType.STRETCH - the band can be split, but never within its declared height. SplitType.IMMEDIATE - the band can be split |
setLastPageFooterStyle(StyleBuilder style) | Sets a last page footer band style |
lastPageFooter(ComponentBuilder<?, ?> ... components), addLastPageFooter(ComponentBuilder<?, ?> ... components) |
Adds components to the last page footer band |
The band is printed on the last page and only once.
Configuration options
method | description |
---|---|
summaryOnANewPage() | Prints the summary band on a separate page |
setSummaryOnANewPage(Boolean summaryOnANewPage) | Sets whether or not the summary band is printed on a separate page |
summaryWithPageHeaderAndFooter() | Prints the summary band with the page header and footer |
setSummaryWithPageHeaderAndFooter(Boolean summaryWithPageHeaderAndFooter) | Sets whether or not the summary band is printed with the page header and footer |
setSummarySplitType(SplitType splitType) | Sets the summary band split type SplitType.PREVENT - prevents the band from splitting SplitType.STRETCH - the band can be split, but never within its declared height. SplitType.IMMEDIATE - the band can be split |
setSummaryStyle(StyleBuilder style) | Sets a summary band style |
summary(ComponentBuilder<?, ?> ... components), addSummary(ComponentBuilder<?, ?> ... components) |
Adds components to the summary band |
The band is printed only when the data source is empty. It's used to show the information that there are not any data in the report.
Configuration options
method | description |
---|---|
setNoDataStyle(StyleBuilder style) | Sets a no data band style |
noData(ComponentBuilder<?, ?> ... components), addNoData(ComponentBuilder<?, ?> ... components) |
Adds components to the no data band |
The band is printed on each page. It's mostly used for adding watermarks to the report.
Configuration options
method | description |
---|---|
setBackgroundStyle(StyleBuilder style) | Sets a background band style |
background(ComponentBuilder<?, ?> ... components), addBackground(ComponentBuilder<?, ?> ... components) |
Adds components to the background band |