Report Header and Report Footer in SSRS

Has anyone found a good way to simulate the Report Header and Report Footer functionality (not be confused with Page Header and Page Footer) that Crystal Reports has, and SSRS doesn’t?

I’ve tried various things, but no luck. The Page Header and Footer have options to be suppressed on first and/or last page. But in my case, I’d need them (Page header & footer) to be suppressed on the 1st & 2nd pages, and/or last and 2nd to last pages.

I even tried making a report that just has my real report as a subreport. but I don’t quite follow how the page header and footer in a sub-report show in the parent report.

Anyone know of any good tutorials or videos on SSRS?

1 Like

Part of the problem with SSRS is that it fully renders the document before it calculates the page numbers. Some things I used to do in Crystal with headers/footers/page breaks/duplex/etc… - based on page numbers - don’t necessarily translate over to SSRS.

Here is a link to just one of the many page number related threads you can find on the web:

BTW… one thing I found while testing page numbers in Report Builder.
Report Builder previews may not return the same page numbers as when the report is printed.
I’ve learned not to trust results based on the page numbers in a Report Builder PREVIEW.

I have found this to be a real issue and pain with customized reports.

An example of what I’m trying to do would be for Mass PO printing.

An Individual PO consists of:

  1. Information to appear at the top of each page (currently in the Page Header). Included in this is the page number of this PO.
  2. Details consisting of line and release info. Can be a single or multiple pages. Each page showing these details also includes the header info from #1 above.
  3. A page footer that contains only the report ID and Style info (this independent of the PO info). This is always on a new page.
  4. A static page of our Purchasing Terms & Conditions. This will not include anything shown in the page header or page footer. Or anything from the PO data.

Not showing the Page header or footer on the T&C page is easy. Forcing the T&C text to a new page is not straightforward (need a reliable solution for this).

It gets extra complicated when mass printing PO’s, because it processes as a single report. This makes using the “suppress on first/last page” option fail. And also causes issues with page numbers.

Imagine a Mass PO print that has 3 PO’s (Numbered 101, 102, and 103), with PO 102, having enough lines that it requires 2 pages (excluding the T&C). The print job should print the following 7 pages

  1. PO 101, a single page. Header includes “Page 1”
  2. The T&C for PO 101. No Page header or footer is displayed.
  3. PO 102, first of two pages. Header includes “Page 1”
  4. PO 102, second of two pages. Header includes “Page 2”
  5. The T&C for PO 102. No Page header or footer is displayed.
  6. PO 103, a single page. Header includes “Page 1”
  7. The T&C for PO 103. No Page header or footer is displayed.

Should I be trying to solve this using sub-reports (each PO is rendered as awhole sub-report)?

Or do away with Page header, and use something like the “Repeat Header row on each page” to act like the page header?

We handle this by placing the Terms and Conditions in a text box placed in the body of the report below the tablix and above the Report Footer. Textbox is set to Can Grow and gets pushed to its own page at the end of the report.

Something special like “Keep together” that forces it to the next page?

Is it just a text box in the Body? Or is it a text box in a Rectangle in the body?

I tried various things but no luck forcing a page break before it.

Just a textbox in the Body.

Edit: Yes, set the textbox to Keep Together.

That works for a single PO.

Now on a Mass Print, it only adds the T&C once, after the last PO. I tried adding it to the group footer of the tablix, but I can’t force a page break before it.

1 Like