Repeat record header when page breaks


I have a case where we want to repeat a sort of "master dataset header" when the records of a details dataset spans more than a page. The so called header is dynamic, it contains some data of the master dataset

I have looked at the 94-Split datasets example, but don't see how it can apply to his case

If possible (the header is the same for all pages in the group), the best is to use "Rows to repeat at top" in Excel. In the ribbon go to the "Page layout" tab, then press any of the little squares at the bottom-right:

The select the "Sheet" tab, and "Rows to repeat at top":

This will make the headers repeat whenever there is a new page, and it won't matter if you are printing to a smaller or bigger paper size. If you have many groups with different headers, as you have only one "rows to repeat at top" per sheet, the solution is to put every group on its own sheet. (see the 25.multiple sheet report demo)

If it is not possible to do it this way, then the other solution is indeed 98-split datasets example, where you split the dataset in master-details of say 30 rows each, add a manual page break, and manually repeat the header each time. But that solution is much more hacky, won't adapt to different paper sizes, and it is just not as nice as rows to repeat at top.

Unfortunately the header is not the same for all pages.
The goal is to repeat the curent "section" header for sections that span on more than one page.
The header informations come from a master dataset and thus vary.

But can't you put every section in a different sheet? This way, every section will have the same header for all pages. You can put the master in the sheets instead of as a master range, and then export all sheets to pdf or print them.

If that is not possible then the only alternative is the approach 98-split dataset example, which allows for maximum customization, but that is seldom needed.

Using a different sheet for each section works.
The export to pdf (ExportAllVisibleSheets) generates a page break between each section.
Is there a way to avoid that ?

That's sadly not possible. We copy the Excel behavior when you print all sheets, and there is always a break on each sheet.