###### Group header panel

The properties of a group header panel in a banded object are:

Property Name | Description
--- | ---
General
Class Type | Indicates the class type of the object. This property is read only.
Data Inherit | Indicates whether the dataset for this object is inherited from another object. This property is read only.
Dataset | Indicates the dataset used by the object. This property is read only.
Geometry
Height | Specifies the height of the object, in inches or centimeters. Enter a numeric value to change the height. Data type: Float
Width | Specifies the width of the object, in inches or centimeters. Enter a numeric value to change the width. Data type: Float
Color
Background | Specifies the background color of the object. Choose a color from the drop-down list, enter a hexadecimal RGB value (e.g. 0xff0000) or choose a formula that returns a color. Data type: String
CSS
Class | Specifies a CSS class to be applied to the object which is a valid class in the CSS file. Data type: String
Style | The property can be used in two ways. Specifies a style to be applied to the object. Choose a style from the drop-down list which is available when a Style Group has been selected at the report level and when there are styles in the Style Group that can be applied to the object, or type in the style name. Specifies a CSS selector to be applied to the object. Enter a valid class name from the CSS file. Data type: String
Others
Cross Page | Specifies whether the panel can be split across a page break. This property is only applied if the report has page layout enabled. The default is false which means that the panel is split only if it exceeds the page height. Data type: Boolean
Export to CSV | Specifies whether to include the object when exporting the report to CSV. Data type: Boolean
Export to DHTML | Specifies whether to include the object when exporting the report to DHTML. Data type: Boolean
Export to Excel | Specifies whether to include the object when exporting the report to Excel. Data type: Boolean
Export to PDF | Specifies whether to include the object when exporting the report to PDF. This property is available only when a web control has been inserted into the object. Data type: Boolean
Fill Whole Page | Specifies whether the last panel on the page is extended to the bottom of the page, so that the next panel starts on a new page. This property does not affect banded page header and banded page footer panels. The default is false which means the panel is not extended. Data type: Boolean
Invisible | Specifies whether to show the object in the design area and in the report results. All formulas and calculations will still be performed if the property is set to true. Data type: Boolean
Label | Specifies the popup text displayed when the mouse pointer hovers over the left edge of the panel. Data type: String
Merge to Next Panel | Specifies whether to merge the panel into the next panel in the exported Excel file. Data type: Boolean
On New Page | Specifies whether the panel starts on a new page. This property is only applied if the report has page layout enabled. The default is false which means the panel starts on a new page only if the previous page is filled. Data type: Boolean
Record Location | Specifies the calculation point for the properties which use formulas. Choose an option from the drop-down list. default - The values of the properties are calculated in the default location where they are located. Page Header - The values of the properties are calculated in the page header. Page Footer - The values of the properties are calculated in the page footer. Data type: Enumeration
Remove Blank Row | Specifies whether to remove blank rows in the panel in the exported Excel file. Data type: Boolean
Repeat | Specifies whether to make the group header appear in every page. Data type: Boolean
Repeat in Detail Panel | Specifies whether to make the objects in the panel repeated in the detail panel in the exported Excel file. Data type: Boolean
Show Bottom Line | Specifies whether to include a horizontal line at the bottom of the panel. This property applies to panels in table components only. The default is false, which means that no horizontal line appears at the bottom of the panel. Data type: Boolean
Suppress | Specifies whether to show the object in the report results. All formulas and calculations will be skipped if the property is set to true. Data type: Boolean
Suppress Blank Panel | Specifies whether a panel with no data is included in the report results. The default is false which means an empty panel is shown. Data type: Boolean
Suppress When No Records | Specifies whether to display the object in the report results when no record is returned to its parent data container. Data type: Boolean
Underlay | Specifies whether the panel will be layered beneath the next panel in the banded object. A panel layered beneath a subsequent panel can be used to contain a background picture or watermark. Banded page header, page footer, or group footer panels cannot be layered. The default is false which means that the panel is not layered beneath the next panel. Data type: Boolean
Border
Border Color | Specifies the color of the border of the object. Choose a color from the drop-down list, enter a hexadecimal RGB value (0xCCAA00) or choose a formula that returns a color. Data type: String
Border Thickness | Specifies the width of the border in inches or centimeters. Data type: Float
Bottom Line | Specifies the line style of the bottom border of the object. Choose a style from the drop-down list. Data type: Enumeration
Left Line | Specifies the line style of the left border of the object. Choose a style from the drop-down list. Data type: Enumeration
Right Line | Specifies the line style of the right border of the object. Choose a style from the drop-down list. Data type: Enumeration
Top Line | Specifies the line style of the top border of the object. Choose a style from the drop-down list. Data type: Enumeration
Accessibility
External CSS Class Selector | Specifies a class selector to be applied to the object when exported as HTML. Enter a valid class name from the CSS file. Data type: String
External ID | It is mapped to the HTML attribute id. This attribute specifies a name to the object, which must be unique in the report. Data type: String
External Style | It is mapped to the HTML attribute style. This attribute specifies style information for the object. Data type: String
Language | It is mapped to the HTML attribute lang. This attribute specifies the base language of the object's attribute values and text content. Data type: String

On New Page

If you want each group to start on a new page, you have two approaches. One is to configure with group header panel as below, the other is to set the Fill Whole Page property for the group footer panel.

There is a problem when you only set On New Page to be true for the group header panel. You will find that the first page will have no details. JREngine starts the detail panel from the second page. To solve this issue, use a formula to control this property. The formula will judge the property as being false for the first group, and being true for subsequent groups for displaying on a new page. You will need to write three formulas and you will also learn how to control property value with a formula. However, if you feel this is too complicated, go to the group footer panel for the second approach.

global:
`global integer i=0;`

groupHD:
`i=i+1;0`

FormulaControl:
`@groupHD;
if (i>1)
return true
else
return false`

Insert formula global into the banded page header panel and assign it an initial value 0. Insert formula groupHD into the group header panel so that for each group i will be calculated as i+1. Then, select the group header panel and let formula FormulaControl control its On New Page property. This formula will only return true for the property if i>1.

Cross Page

The default value for Cross Page is false. For one detail panel which spans a large space vertically to be shown in the first page, then the default false value will make it shown in the second page. So you should set it to true in order to avoid the empty first page.

Repeat

The default value for Repeat is false. For one detail panel which spans a large space vertically to be shown in several pages, we support the Repeat property if you want to see the group header information in each page. When the Repeat property is set true and group headers are visible, the group headers will duplicate on every page. The Repeat property is a Boolean variable and can be changed by a formula.

Notes:

- When a page split occurs in the bottom blank part of the detail panel (or margins in the detail panel) and the Cross Page property in the Detail panel is set true, the output will be: repeated group header + a slice of blank detail panel + group footer. It appears as though the repeated group headers are followed only by group footers without any detail panel. In order to solve this problem, you can resize the detail panel.
- If the Repeat property is set true in both outer group header and inner group header, JReport will treat the two group headers as a completely repeated object.
- If the outer and inner group headers are set to be one completely repeated object, then when the page can only hold the group headers or has no enough space for the group headers, both outer and inner group headers will not be duplicated.
- The Repeat property does not work for subreport.

A group control image can be inserted into the group header panel. See the next section for properties of a group control image.