A details header is printed between the last group-header and the first detail band. The header is
printed on the itemsStarted(..) event. A details-header cannot carry subreports.
This behavior can be easily changed with a style-expression on the visible-style-property.
("=NOT(ISEMPTYDATA())"
| Method from org.jfree.report.DetailsHeader Detail: |
public final SubReport getSubReport(int index) {
throw new IndexOutOfBoundsException("DetailsHeader cannot have subreports");
}
Throws an IndexOutOfBoundsException as page-footer cannot have sub-reports. |
public final int getSubReportCount() {
return 0;
}
Returns the number of subreports on this band. This returns zero, as page-bands cannot have subreports. |
public SubReport[] getSubReports() {
return DetailsHeader.EMPTY_SUB_REPORTS;
}
Returns an empty array, as page-footer cannot have subreports. |
public boolean isRepeat() {
return getStyle().getBooleanStyleProperty(BandStyleKeys.REPEAT_HEADER);
}
Checks whether this group header should be repeated on new pages. |
public boolean isSticky() {
return getStyle().getBooleanStyleProperty(BandStyleKeys.STICKY, false);
}
Returns true if the footer should be shown on all subreports. |
public void setRepeat(boolean repeat) {
getStyle().setBooleanStyleProperty(BandStyleKeys.REPEAT_HEADER, repeat);
}
Defines, whether this group header should be repeated on new pages. |
public void setSticky(boolean b) {
getStyle().setBooleanStyleProperty(BandStyleKeys.STICKY, b);
}
Defines whether the footer should be shown on all subreports. |