With the introduction of objects as an accepted reporting data source, we slightly modified the MailMerge API to reflect these changes. In TX Text Control X10, DataTables, DataSets and all kind of enumerable objects can be used as data sources.
This implies that you don't have to pass data for merge blocks separately. By passing a master table to the Merge method, TX Text Control is getting related tables from the master table's DataSet automatically. To compare this new logic to previous versions, imagine an extra, non-visible repeating block around the whole template that is considered automatically by MailMerge. The following illustration shows the sample invoice template and the different tables:
Another great advantage of this new concept are prefixed merge field names that use the object-oriented dot notation to describe the path of nested tables. By passing only the master table to the Merge method, a field can refer to a nested table by adding the table path elements divided by a dot as a prefix. The following screenshot shows the new Insert Merge Field dialog that lists all available fields of the master table and related tables of the sample database in TX Text Control Words.
The inserted field name looks like this:
Where Customer_Customer is a sub-table of the master table Sales_SalesOrderHeader.