Gets or sets a value that determines on which pages the Page Header section should be displayed.

Namespace:  C1.C1Report
Assembly:  C1.C1Report.2 (in C1.C1Report.2.dll)

Syntax

C#
[DefaultValueAttribute(HdrFtrEnum.AllPages)]
public HdrFtrEnum PageHeader { get; set; }
Visual Basic
<DefaultValueAttribute(HdrFtrEnum.AllPages)> _
Public Property PageHeader As HdrFtrEnum
	Get
	Set

Remarks

You can use the PageHeader and PageFooter properties to specify whether a report's page header or page footer should be printed on the same page as a report header or report footer.

For example, you might not want to print a page header containing the page number on the first page of a report if the report header is a cover sheet.

The default value for this property is HdrFtrEnum.AllPages.

Examples

The following code adds a Page Header that shows the current date (note that it also suppresses it on the first page):

Copy CodeVisual Basic
Dim f As Field
' create a Page Header
With rptCategory.Sections(SectionTypeEnum.PageHeader)
    .Height = 500
    .Visible = True
    f = .Fields.Add("h1", Now(), 7000, 0, 3000, 300)
    f.Font.Size = 10
    f.ForeColor = Color.FromArgb(0, 0, 100)
End With
' suppress Page Header on the first page 
Me.rptCategory.Layout.PageHeader = HdrFtrEnum.NotWithReportHdr
Copy CodeC#
// create a Page Header
Section s = rptCategory.Sections[SectionTypeEnum.PageHeader];
    s.Height = 500;
    s.Visible = true;
    Field f = s.Fields.Add("h1", Now(), 7000, 0, 3000, 300);
    f.Calculated = true;
    f.Font.Size = 10;
    f.ForeColor = Color.FromArgb(0, 0, 100);
// suppress Page Header on the first page 
this.rptCategory.Layout.PageHeader = HdrFtrEnum.NotWithReportHdr;

For an example illustrating this, see the Changing Page Headers Dynamically topic.

See Also