The most typical application is the creation of templates for the Text Control Reporting engine DocumentServer.MailMerge. The ribbon tab Mailings is designed to insert merge fields and merge blocks compatible to the reporting classes of TX Text Control.

Text Control Web - Fundamental Concepts: The Data Source

The drop-down buttons Select Master Table, Insert Merge Field and Insert Merge Block are pre-filled with items of a specific Database Excerpt XML file that can be loaded programmatically.

Text Control Web - Fundamental Concepts: The Data Source

This XML database file contains table definitions, relations and row excerpts to provide a preview of the report. This XML file can be easily created using the Windows version of the template designer TX Text Control Words. To create such an XML file, follow the next easy steps:

  1. Open TX Text Control Words that is located in your Windows start menu or start screen.

    Text Control Web - Fundamental Concepts: The Data Source
  2. Open the Mailings tab and choose Data Source from the Data Source drop-down button.

    Text Control Web - Fundamental Concepts: The Data Source
  3. Follow the next steps and instructions of the Choose Data Source dialog to open your preferred data source.

    Text Control Web - Fundamental Concepts: The Data Source
  4. If your data source has been added successfully, you can save the excerpt using the Save Excerpt menu item of the Data Source drop-down button. In the opened dialog Save Data Base Excerpt, select the root table and set the maximum number of exported rows. Then select an export file name and confirm with OK.

    Text Control Web - Fundamental Concepts: The Data Source
  5. This XML file can be loaded using the LoadXMLDatabase method of Web.TextControl:

    [C#]
    TextControl1.LoadXMLDatabase("datasource_excerpt.xml")
    [VB.NET]
    TextControl1.LoadXMLDatabase("datasource_excerpt.xml")

Additionally, the data source can be also loaded from an XMLDocument or FileStream and a DataSet can be directly loaded using the LoadDataSet method.