ActiveReports 18 .NET Edition
Report Authors: Designer Components / Design Reports / Design Section Reports / Layout
In This Topic
    Layout
    In This Topic

    By default, a section report is composed of three banded sections: a PageHeader, a Detail section, and a PageFooter. You can right-click the report and select Insert and choose other section pairs to add: ReportHeader and Footer, or GroupHeader and Footer.

    All sections except the detail section come in pairs, above and below the detail section. You can hide any section that you are not using by setting the Visible property of the section to False.

    ActiveReports defines the following section types:

    Section Report Design Layout 

    Report Header

    A report can have one report header section that prints at the beginning of the report. You generally use this section to print a report title, a summary table, a chart or any information that only needs to appear once at the report's start. This section has a NewPage property that you can use to add a new page before or after it renders.

    The Report Header does not appear on a section report by default. In order to add this section, right-click the report and select Insert > Report Header/Footer to add a Report Header and Footer pair.

    Page Header

    A report can have one page header section that prints at the top of each page. Unless the page contains a report header section, the page header is the first section that prints on the page. You can use the page header to print column headers, page numbers, a page title, or any information that needs to appear at the top of each page.

    Group Header

    A report can include single or nested groups, with each group having its own header and footer sections. You can insert and print the header section immediately before the detail section.

    In Columnar Reports, you can use ColumnGroupKeepTogether, and select whether to start a NewColumn before or after a group.

    You can also specify whether to print a NewPage before or after the section, and have the section print on every page until the group details complete with the RepeatStyle property. The UnderlayNext property allows you to show group header information inside the group details, so long as you keep the BackColor property of the Detail section set to Transparent.

    You can group data by adding a pair of group header and group footer sections to the report. These sections appear immediately above and below the Detail section.

    Controls in the group header render once for each instance of the group, so you can place the column header labels to describe the data in the detail fields here.

    Caution: You cannot add a header section without a corresponding footer section. If you try to do so in code, the results are unstable.

    You can set the properties for the GroupHeader and GroupFooter sections in their corresponding dialogs. Following is a list of properties you can set through the options in these dialogs. Each option in the GroupHeader dialog corresponds to a property in the properties panel. To access the properties directly, select the section and open the properties window. See the associated property names in parenthesis with each dialog option below.

    GroupHeader Dialog

    GroupHeader Dialog 

    To access the GroupHeader dialog, right click the group header and in the Properties window under the properties list where the commands are displayed, click the Property dialog link. 

    General

    • Name (Name): Indicates the name of the GroupHeader in code. It is unique for a report.
    • Tag (Tag): Indicates the user-defined information persisted with the GroupHeader section.
    • Visible (Visible): Checkbox to specify the visibility of the GroupHeader section.
    • DataField (DataField): Field or expression on which you group the data.

    Appearance

    • Background color (BackColor): Dropdown list to set the background color of the GroupHeader section.

    Layout

    • Insert new page (NewPage): Dropdown list to determine whether a new page is inserted before and/or after displaying the GroupHeader section.
    • Insert new column (NewColumn): Dropdown list to determine whether a new column (in a multi-column report) appears before and/or after displaying the GroupHeader section.
    • Repeat section (RepeatStyle): Dropdown list to specify whether the GroupHeader section appears with every column or page that the Detail section or associated footer appears on.
    • Keep section and its footer on a single page (GroupKeepTogether): Dropdown list to specify whether the GroupHeader section and its footer appear as a single block on the same page or not.
    • Keep section on a single page (KeepTogether): Checkbox to specify whether the GroupHeader section appears on a single page.
    • Keep section and its footer in a single column (ColumnGroupKeepTogether): Checkbox to specify whether the GroupHeader section and its footer appear as a single block in the same column.
    • Keep section underneath the following section (UnderlayNext): Checkbox to specify whether the GroupHeader section appears in the following section or not. It allows you to show group header information inside the group details, so long as you keep the BackColor property of the Detail section set to Transparent.
    • Use column layout (ColumnLayout): Checkbox to determine whether the GroupHeader section uses the same column layout as the Detail section.
    • Can increase to accommodate contents (CanGrow): Checkbox to specify whether the height of the GroupHeader section can grow when its controls extend beyond its original height.
    • Can decrease to accommodate contents (CanShrink): Checkbox to specify whether the height of the GroupHeader section can adjust to the total height of controls placed in it.

    Detail

    A report has one detail section. The detail section is the body of the report and one instance of the section is created for each record in the report. You can set the CanShrink property to True to eliminate white space after controls, and you can set up Columnar Reports using ColumnCount, ColumnDirection, ColumnSpacing and NewColumn properties.

    The KeepTogether property attempts to keep the section together on a single page, and the RepeatToFill property allows you to fill each page with the same number of formatted rows, regardless of whether there is enough data to fill them. This is especially useful for reports such as invoices in which you want consistent formatting like lines or green bars or back colors to fill each page down to the Footer section at the bottom.

    See Detail for further information on properties.

    Note: You cannot use the RepeatToFill property if you are using the PageBreak or SubReport control in the Detail section, or if you have set the NewPage or NewColumn property to any value other than None. When you use this property in a report where two groups are present, the ReportFooter section prints on the next page. This property processes correctly only with single grouping.

    Group Footer

    A report can include single or nested groups, with each group having its own header and footer sections. You can insert and print the footer section immediately after the detail section.

    Group Footer Dialog 

    To access the GroupFooter dialog, right click the group footer and in the Properties window under the properties list where the commands are displayed, click the Property dialog link.

    General

    • Name (Name): Indicates the name of the GroupFooter in code. It is unique for a report.
    • Tag (Tag): Indicates the user-defined information persisted with the GroupFooter section.
    • Visible (Visible): Checkbox to specify the visibility of the GroupFooter section.

    Appearance

    • Background color (BackColor): Dropdown list to set the background color of the GroupFooter section.

    Layout

    • Insert new page (NewPage): Dropdown list to determine whether a new page is inserted before and/or after displaying the GroupFooter section.
    • Insert new column (NewColumn): Dropdown list to determine whether a new column (in a multi-column report) appears before and/or after displaying the GroupFooter section.
    • Keep section on a single page (KeepTogether): Checkbox to determine whether the GroupFooter section appears on a single page.
    • Use column layout (ColumnLayout): Checkbox to specify whether the GroupFooter section uses the same column layout as the Detail section.
    • Print at the bottom of page (PrintAtBottom): Checkbox to specify whether the GroupFooter section is printed at the bottom of the page immediately before the PageFooter section.
    • Can increase to accommodate contents (CanGrow): Checkbox to specify whether the height of the GroupFooter section can grow when its controls extend beyond its original height. 
    • Can decrease to accommodate contents (CanShrink): Checkbox to specify whether the height of the GroupFooter section can adjust to the total height of controls placed in it.

    When you run the report, it renders the group header, followed by all related instances of the detail section, and then the group footer. It renders a new group header section for each instance of the grouping field.

    Page Footer

    A report can have one page footer section that prints at the bottom of each page. You can use the page footer to print page totals, page numbers, or any other information that needs to appear at the bottom of each page.

    Report Footer

    A report can have one report footer section that prints at the end of the report. Use this section to print a summary of the report, grand totals, or any information that needs to print once at the end of the report.

    The Report Footer does not appear on a section report by default. In order to add this section, right-click the report and select Insert > Report Header/Footer to add a Report Header and Footer pair.

    Note: If the report contains a Page Footer on the last page, the Report Footer appears above the Page Footer.