Pagination question; keeping pieces of a section together


writing a report in which a section has a table with a header row, and multiple content rows. was wondering if it was possible to require that all the rows in the table stay on the same page
as the header. that is, if a row spills over to the next page the rest of the table comes with it.

alternately, is there a way to detect when you’ve spilled over onto the next page, so that maybe you could repeat the most recent header?



If you design the table in MS Word, then you can specify the row as a header row and MS Word will repeat it on every page. This setting is in Table Properties/Row.

If you are building the table using DocumentBuilder, then use RowFormat.HeadingFormat = true to mark the row as a header row.


/// True if the row is repeated as a table heading on every page when the table spans more than one page.

public bool HeadingFormat

From what I know, it is not possible to instruct MS Word to keep all rows of a table in a single page. Only header row like I described above will do what you want.