Tables Uncovered: Using Table Headers in Your Reports
TX Text Control supports repeating table header rows that automatically reappear when a report table wraps to a new page or column. Using TX Text Control Words, developers can insert merge blocks with table headers and add multiple header rows through the table properties dialog.

When it comes to sales sheets, product lists or any other type of business reports, using tables is always suitable to arrange large amounts of data. A table header defines names or meanings of displayed table columns. This header can be repeated automatically when:
- the table is wrapped to a new page or
- the table is wrapped to a new page column.
The following steps show how to use the template designer TX Text Control Words and the shipped sample database to insert a repeating block with a table header.
-
Open TX Text Control Words and choose Load Sample Database from the Select Data Source drop-down button in the Mailings ribbon tab.

-
Open the Insert Merge Block drop-down button and select Sales_SalesOrderDetail from the available tables.

-
In the opened dialog, choose the columns you would like to add to the table and make sure that the checkbox Add table header row is checked.
After confirming with OK, the following table is inserted into the template:

TX Text Control doesn't only support one table header row, but n table rows that are repeated automatically. So, let's add an additional row above the already existing one.
-
Set the input position into the first cell of the table and choose Insert Above from the Rows & Columns group of the Table Tools contextual ribbon tab.

-
By adding a new row, the row at the current input position is cloned and the format and settings are applied automatically, so that the new row is part of the table header. You can verify this setting by opening the table properties dialog. Set the input position into the newly inserted row and choose Properties from the Table group.
In the second tab page of the opened dialog box, the Repeat as header row at the top of each page setting is checked.

-
For cosmetic reasons, let's add some formatting to the new header row. Close the dialog, select the whole row and choose Merge Cells from the Merge group. Add some text to the cell, center it and apply some formatting:

Now it is time to test this merge block.
-
Open the Mailings tab again and choose Sales_SalesOrderDetail from the Select Master Table drop-down button.

-
Finally, click on Preview Merge Fields to start the merge process. The following screenshot shows the automatically repeated table header on a new page:

Try it on your own and download a trial version of TX Text Control today.
Reporting
The Text Control Reporting Framework combines powerful reporting features with an easy-to-use, MS Word compatible word processor. Users can create documents and templates using ordinary Microsoft Word skills. The Reporting Framework is included in all .NET based TX Text Control products including ASP.NET, Windows Forms and WPF.
Related Posts
Creating Your First ASP.NET Reporting Application
The MailMerge and ServerTextControl components of TX Text Control .NET Server for ASP.NET enable server-side reporting in Web Forms. A template.docx merges with XML data via a button click…
New Online Sample: Build your First Report
A new interactive online demo walks through building a report with TX Text Control in three steps: preparing JSON data in a live editor, creating a template with merge fields and repeating blocks,…
ReportingDocumentationReportingCloud
Create your First Document with ReportingCloud
ReportingCloud documentation now includes interactive tutorials for creating documents without code. Users enter an API key, choose a format such as PDF or DOCX, customize the merge data payload,…
MailMerge: Starting Each Merge Block on a New Page
Merge blocks in TX Text Control repeat based on matching data rows. Applying ParagraphFormat.PageBreakBefore to the first paragraph of a block forces each repetition onto a new page. Section…
Using MailMerge with JSON Data
Merge document templates with JSON data using TX Text Control MailMerge by converting nested JSON strings into DataSet objects via Newtonsoft.Json. The JSON is first transformed to XML, then…
