Creating product lists or sales reports is a common application for TX Text Control's reporting engine MailMerge. Repeating table rows, where related detail information is listed in sub tables, are typical elements of such reports. The following screenshot illustrates such a list:

Repeating blocks with related sub tables

Creating those master-detail views is a very easy task using TX Text Control. Master-detail interfaces display a master list and details for the current item. Think of a product list divided into categories where all products are listed in a sub table under the specific category.

This basic tutorial shows how to create such a list based on the sample database that comes with TX Text Control Words - the shipped template designer. At the end of this tutorial, the following template will be created that can be directly tested with the sample database:

Repeating blocks with related sub tables
  1. Open TX Text Control Words. In the Mailings ribbon tab, click the Load Sample Database menu item from the Select Data Source drop-down button.

    Repeating blocks with related sub tables
  2. From the Merge Blocks ribbon group, open the Insert Merge Block drop-down button and select Sales_SalesOrderDetail to insert a merge block.

    Repeating blocks with related sub tables
  3. In the opened dialog box, select OrderQty, UnitPrice and LineTotal from the available table colums. Check the Add table header row check box and confirm with OK.

    Repeating blocks with related sub tables
  4. The following formatted merge block is inserted into the document:

    Repeating blocks with related sub tables
  5. Set the input position into the second table row and choose Insert Below from the Rows & Columns ribbon group of the Table Tools contextual ribbon group.

    Repeating blocks with related sub tables
  6. Insert a second row, change the background color of the new table rows and indent the first column. Additionally, add column names to the first blue table row.

    Repeating blocks with related sub tables
  7. Set the input position into the second row of the blue table rows and choose Sales_SalesOrderDetail from the Insert Merge Field drop-down button.

    Repeating blocks with related sub tables
  8. In the opened dialog box, expand the Production_Product node in the tree view, select Name and confirm with Insert Field. This dialog shows all related sub tables and their available field names.

    Repeating blocks with related sub tables

    Repeat this step for the next column ProductNumber.

  9. Set the input position into the third column of the new blue row and choose Image Placeholder from the Image drop-down button of the Insert ribbon group.

    Repeating blocks with related sub tables
  10. Scale down the image placeholder that should fit into the table cell. Right-click the image placeholder and select Sales_SalesOrderDetail from the context menu item Select Object Data Source.

    Repeating blocks with related sub tables
  11. In the opened dialog box, expand the nodes until you reach Production_ProductPhoto, select ThumbNailPhoto and confirm with Insert Field.

    Repeating blocks with related sub tables
  12. Right-click the image again and set the Text Wrapping to In Line.

    Repeating blocks with related sub tables
  13. Choose Preview Merge Fields from the Mailings ribbon tab to start the merge process. In the opended dialog box, confirm the number of preview records with OK.

    Repeating blocks with related sub tables

You can download the sample template and load it into the shipped sample TX Text Control Words.

Try TX Text Control Reporting yourself!
Download the TX Text Control Trial version today.

Download Trial

Or Simply Call Us to Learn More:

United States

+1 704 544 7445 (US)

Europe - Germany

+49 421 427067 10 (Europe)