Products Technologies Demo Docs Blog Support Company

Reporting: MailMerge API Changes in Version X10

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. The method MergeBlocks has been deprecated and merged into the Merge or MergeObjects method. 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…

Reporting: MailMerge API Changes in Version X10

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.

The method MergeBlocks has been deprecated and merged into the Merge or MergeObjects method.

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:

MailMerge API changes in version X10

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.

MailMerge API changes in version X10

The inserted field name looks like this:

Customer_Customer.Sales_CustomerAddress.Person_Address.City

Where Customer_Customer is a sub-table of the master table Sales_SalesOrderHeader.

Happy coding!

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)

Stay in the loop!

Subscribe to the newsletter to receive the latest updates.

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.

See Reporting products

Related Posts

ActiveXASP.NETReporting

TX Text Control 32.0 Has Been Released

We are pleased to announce the immediate availability of TX Text Control 32.0 for all platforms including ASP.NET, Windows Forms, WPF and ActiveX.


ActiveXASP.NETReporting

TX Text Control 31.0 and TX Spell .NET 10.0 Have Been Released

We are happy to announce the immediate availability of TX Text Control 31.0 for all platforms including ASP.NET, Windows Forms, WPF and ActiveX and TX Spell .NET 10.0 for all .NET based platforms.


ActiveXASP.NETReporting

TX Text Control 30.0 and TX Spell .NET 9.0 Have Been Released

We are happy to announce the immediate availability of TX Text Control 30.0 for all platforms including ASP.NET, Windows Forms, WPF and ActiveX and TX Spell .NET 9.0 for all .NET based platforms.


ActiveXASP.NETReporting

TX Text Control X19 and TX Spell 8.0 Have Been Released

We are happy to announce the immediate availability of TX Text Control X19 for all platforms including Windows Forms, WPF and ASP.NET and TX Spell .NET 8 for all .NET based platforms.


AngularReportingRelease

TX Text Control for Angular X18 Published

We just published the npm packages for TX Text Control for Angular X18.