SAP Knowledge Base Article - Public

1216760 - How to include a Page Header or Page Footer when printing a Report Header in Crystal Reports?

Symptom

  • Page Footer not printing on the first page.
  • Page Header and Page Footer not printing on the same page as the Report Header.
  • When a Report Header is created that spans more than one page, it will print without any Page Headers or Footers until the last page.
  • How to print a Page Header, and a Page Footer, when printing a Report Header section in Crystal Reports?

Environment

  • SAP Crystal Reports 2013
  • SAP Crystal Reports 2016
  • SAP Crystal Reports 2020 

Reproducing the Issue

  1. In Crystal Reports, create a report based on any data source.
  2. Insert information in a Report Header section.
  3. Add information in a Page Header and a Page Footer section, like the page number, or a title.
  4. When refreshing the report, it does not include a Page Header and Page Footer when printing the Report Header information.

Cause

  • Report Header is like a cover page for a report.
  • Report Header only print once at the beginning of a report, and does not print a Page Header, and Page Footer section.

Resolution

  • To print a Page Header and a Page Footer section for information that only print once at the beginning of a report, create a group on a formula, then move all the Report Header information to the Group Header, and suppress the Report Header section:
      
    1. In Crystal Reports, open your report.
        
    2. Create a new formula, called: New Header, and enter the following code:

          WhileReadingRecords; ""

    3. Save and close the formula.
        
    4. Under the menu "Insert", select "Group..."
        
    5. In "Insert Group", select in the first drop-down list the formula: "New Header", and click "OK"
       
    6. In the "Design" view of the report, resize the Group Header section to be as large as needed.
       
    7. Move the information inserted in the Report Header section, to the Group Header section.
       
    8. Suppress the Report Header section.
        
        
  • For an example based on the xtreme sample database, see the report in the Attachments section below, called: Printing Page Header and Footer.rpt

Keywords

CR, ReportHeader , KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , How To

Product

SAP Crystal Reports 2013 ; SAP Crystal Reports 2016 ; SAP Crystal Reports 2020

Attachments

Printing Page Header and Footer.rpt