# Text Control Web - Fundamental Concepts: The Data Source

> The TX Text Control HTML5 Web editor populates its Mailings ribbon tab from Database Excerpt XML files that define merge fields and blocks. Developers generate these XML excerpts using TX Text Control Words and load them into the Web editor via the LoadXMLDatabase method.

- **Author:** Bjoern Meyer
- **Published:** 2014-10-02
- **Modified:** 2026-03-05
- **Description:** The TX Text Control HTML5 Web editor populates its Mailings ribbon tab from Database Excerpt XML files that define merge fields and blocks. Developers generate these XML excerpts using TX Text Control Words and load them into the Web editor via the LoadXMLDatabase method.
- **3 min read** (467 words)
- **Tags:**
  - Reporting
  - Tutorial
- **Web URL:** https://www.textcontrol.com/blog/2014/10/02/text-control-web-fundamental-concepts-the-data-source/
- **LLMs URL:** https://www.textcontrol.com/blog/2014/10/02/text-control-web-fundamental-concepts-the-data-source/llms.txt
- **LLMs-Full URL:** https://www.textcontrol.com/blog/2014/10/02/text-control-web-fundamental-concepts-the-data-source/llms-full.txt

---

The most typical application is the creation of templates for the Text Control Reporting engine [DocumentServer.MailMerge](https://docs.textcontrol.com/textcontrol/windows-forms/ref.txtextcontrol.documentserver.mailmerge.class.htm). 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](https://s1-www.textcontrol.com/assets/dist/blog/2014/10/02/a/assets/fundamental_basics_1.webp "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](https://s1-www.textcontrol.com/assets/dist/blog/2014/10/02/a/assets/fundamental_basics_2.webp "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](https://s1-www.textcontrol.com/assets/dist/blog/2014/10/02/a/assets/fundamental_basics_3.webp "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](https://s1-www.textcontrol.com/assets/dist/blog/2014/10/02/a/assets/fundamental_basics_4.webp "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](https://s1-www.textcontrol.com/assets/dist/blog/2014/10/02/a/assets/fundamental_basics_5.webp "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](https://s1-www.textcontrol.com/assets/dist/blog/2014/10/02/a/assets/fundamental_basics_6.webp "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.

---

## About Bjoern Meyer

As CEO, Bjoern is the visionary behind our strategic direction and business development, bridging the gap between our customers and engineering teams. His deep passion for coding and web technologies drives the creation of innovative products. If you're at a tech conference, be sure to stop by our booth - you'll most likely meet Bjoern in person. With an advanced graduate degree (Dipl. Inf.) in Computer Science, specializing in AI, from the University of Bremen, Bjoern brings significant expertise to his role. In his spare time, Bjoern enjoys running, paragliding, mountain biking, and playing the piano.

- [LinkedIn](https://www.linkedin.com/in/bjoernmeyer/)
- [X](https://x.com/txbjoern)
- [GitHub](https://github.com/bjoerntx)

---

## Related Posts

- [Creating Your First ASP.NET Reporting Application](https://www.textcontrol.com/blog/2020/01/01/creating-your-first-aspnet-reporting-application/llms.txt)
- [New Online Sample: Build your First Report](https://www.textcontrol.com/blog/2019/07/03/build-your-first-report/llms.txt)
- [Create your First Document with ReportingCloud](https://www.textcontrol.com/blog/2019/02/19/create-your-first-document-with-reportingcloud/llms.txt)
- [MailMerge: Starting Each Merge Block on a New Page](https://www.textcontrol.com/blog/2016/09/09/mailmerge-starting-each-merge-block-on-a-new-page/llms.txt)
- [Using MailMerge with JSON Data](https://www.textcontrol.com/blog/2015/08/04/using-mailmerge-with-json-data/llms.txt)
- [Merging Documents with RESTful Web API's](https://www.textcontrol.com/blog/2015/07/31/merging-documents-with-restful-web-apis/llms.txt)
- [Windows Forms: Printing Multiple Pages Per Sheet](https://www.textcontrol.com/blog/2015/07/24/windows-forms-printing-multiple-pages-per-sheet/llms.txt)
- [Inserting Watermark Images to All Pages Dynamically](https://www.textcontrol.com/blog/2015/07/17/inserting-watermark-images-to-all-pages-dynamically/llms.txt)
- [Reporting: Sorting Merge Block Rows by Column Name](https://www.textcontrol.com/blog/2015/07/15/reporting-sorting-merge-block-rows-by-column-name/llms.txt)
- [MailMerge with the Entity Framework Using Database First](https://www.textcontrol.com/blog/2015/06/24/mailmerge-with-the-entity-framework-using-database-first/llms.txt)
- [Checked and Unchecked Check Boxes with IF Fields](https://www.textcontrol.com/blog/2015/03/25/checked-and-unchecked-check-boxes-with-if-fields/llms.txt)
- [Reporting: Conditional Formatted Text Blocks](https://www.textcontrol.com/blog/2015/03/13/reporting-conditional-formatted-text-blocks/llms.txt)
- [Reporting Best Practices and How-To Guides](https://www.textcontrol.com/blog/2015/02/05/reporting-best-practices-and-how-to-guides/llms.txt)
- [MailMerge: Master Table and Client Tables](https://www.textcontrol.com/blog/2015/01/28/mailmerge-master-table-and-client-tables/llms.txt)
- [MailMerge: Formatting Numeric Strings in Merge Fields](https://www.textcontrol.com/blog/2015/01/22/mailmerge-formatting-numeric-strings-in-merge-fields/llms.txt)
- [MailMerge: Merge CheckBoxes During the Merge Process](https://www.textcontrol.com/blog/2015/01/12/mailmerge-merge-checkboxes-during-the-merge-process/llms.txt)
- [MailMerge: Conditional INCLUDETEXT Fields](https://www.textcontrol.com/blog/2015/01/08/mailmerge-conditional-includetext-fields/llms.txt)
- [HTML5 Technical Considerations - The Concept Explained](https://www.textcontrol.com/blog/2014/10/16/html5-technical-considerations-the-concept-explained/llms.txt)
- [TX Text Control Web: Attaching Events to Ribbon Elements](https://www.textcontrol.com/blog/2014/10/07/tx-text-control-web-attaching-events-to-ribbon-elements/llms.txt)
- [TX Text Control Web: Customize the Ribbon Bar](https://www.textcontrol.com/blog/2014/10/03/tx-text-control-web-customize-the-ribbon-bar/llms.txt)
- [Reporting: Removing Empty Table Rows](https://www.textcontrol.com/blog/2014/09/30/reporting-removing-empty-table-rows/llms.txt)
- [MS Word Content Controls Field Adapter Classes](https://www.textcontrol.com/blog/2014/08/05/ms-word-content-controls-field-adapter-classes/llms.txt)
- [Reporting: Merge Blocks and Structured Numbered Lists](https://www.textcontrol.com/blog/2014/07/29/reporting-merge-blocks-and-structured-numbered-lists/llms.txt)
- [Creating Avery Labels Using Text Control Reporting](https://www.textcontrol.com/blog/2014/07/22/creating-avery-labels-using-text-control-reporting/llms.txt)
- [New Online Samples for TX Text Control .NET Server](https://www.textcontrol.com/blog/2014/07/16/new-online-samples-for-tx-text-control-net-server-for-aspnet/llms.txt)
