Reporting: Merge Blocks and Structured Numbered Lists
The document element that is used to render a list in a report is typically a table. And that makes a lot of sense when tabular data should be presented. But Text Control Reporting is not limited to tables when it comes to repeating merge blocks to generate lists. Consider a list of sold products per transaction. The structure element should be a numbered list instead of a table which gives us the option to display row or items numbers automatically. The template is shown in the screenshot…

The document element that is used to render a list in a report is typically a table. And that makes a lot of sense when tabular data should be presented. But Text Control Reporting is not limited to tables when it comes to repeating merge blocks to generate lists.
Consider a list of sold products per transaction. The structure element should be a numbered list instead of a table which gives us the option to display row or items numbers automatically.
The template is shown in the screenshot below:
The outer merge block (start and end positions shown as bookmark markers ) is the parent table Sales_SalesOrderHeader that represents the transaction and the inner block lists all sold products.
The inner block has a structured numbered list at level 3 - for each product, a new list item is added. For the complete transaction, a new level 1 item is inserted which results in a nice and clean structured numbered list for all sales transactions and their associated sold products.
The boxes and horizontal lines are paragraph frames that are repeated as part of the block automatically.
- Start TX Text Control Words, the template designer that comes with the installation package of TX Text Control.
- Download the template and load it into TX Text Control Words.
-
Choose Load Sample Database from the Data Source ribbon group in the Mailings ribbon tab.
-
Choose Sales_SalesOrderDetail as the master table from the Select Master Table drop-down button.
- Press the Preview Merge Fields button to start the merge process.
At least a trial version of TX Text Control .NET for Windows Forms is required to test this on your own.
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
This tutorial shows how to use the MailMerge component in an ASP.NET Web application to merge a template with data to create an Adobe PDF document.
New Online Sample: Build your First Report
We published a new online demo that shows how to create a report including preparing data, creating a template to merging them together.
ReportingDocumentationReportingCloud
Create your First Document with ReportingCloud
As part of our new ReportingCloud documentation, we published a guided tutorial that shows how to create a document without programming.
MailMerge: Starting Each Merge Block on a New Page
A merge block is repeated based on the number of matching data rows in the hierarchical data object. The complete merge block is cloned and inserted under the original location in the template.…
Using MailMerge with JSON Data
In the last article, we explained how to create an ASP.NET Web API to merge templates with JSON data in the payload body of an HTTP request. The focus of this article was on the Web API and…