I want a document with multiple pages. Every page should have the same header. One section of the document contains a long table, which stretches over multiple pages. On every page of this section I want to show a title above the table.
I came up with two solutions so far. Both seem hacky and have their downsides:
Make the title part of the header in this section. Feels wrong and is also annoying when I have other pages in the document which should contain the header but not the title.
Make the title part of the table and use HeadingFormat
. Feels hacky as well because the title doesn't "fit" in the columns of the table.
Any better ideas?
Re 1: Put the table in a new section and set a new header for that section. One line can be the standard header shared by all pages, another line can be a special header for the table section.
Does not look hacky to me.
Re 2: You can set the HeadingFormat for several rows. So you can use the first row for the "header" without any border and with a MergeRight so it spans the whole page. Not really hacky and will look like normal text outside the table.
Solution 1 has a downside as every new section starts on a new page. Well, the table is so important that it even gets an own page header, so this downside should not matter.
A hacky and tricky solution would be using PDFsharp to add a special header on all pages with the table on it. I think I'd go for option 2.