# Sneak Peek X16: Filter and Sort MergeBlock Rows

> TX Text Control X16 adds data shaping to MergeBlock rows, allowing sorting and filtering of repeating block data during mail merge operations. The MergeBlockInfo class exposes SortingInstructions, Filters, and BlockMergingCondition properties for full programmatic control.

- **Author:** Bjoern Meyer
- **Published:** 2018-04-26
- **Modified:** 2026-07-17
- **Description:** TX Text Control X16 adds data shaping to MergeBlock rows, allowing sorting and filtering of repeating block data during mail merge operations. The MergeBlockInfo class exposes SortingInstructions, Filters, and BlockMergingCondition properties for full programmatic control.
- **3 min read** (441 words)
- **Tags:**
  - ASP.NET
  - Release
  - Reporting
  - Windows Forms
  - WPF
- **Web URL:** https://www.textcontrol.com/blog/2018/04/26/sneak-peek-x16-filter-and-sort-mergeblock-rows/
- **LLMs URL:** https://www.textcontrol.com/blog/2018/04/26/sneak-peek-x16-filter-and-sort-mergeblock-rows/llms.txt
- **LLMs-Full URL:** https://www.textcontrol.com/blog/2018/04/26/sneak-peek-x16-filter-and-sort-mergeblock-rows/llms-full.txt

---

A *MergeBlock* is a reporting structure to repeat content based on data rows associated with this repeating block. Typically, a merge block contains a list of elements such as order items in an invoice. A block can be a table row, a paragraphs or multiple lines.

In version X16, we are going to introduce **data shaping** to filter and sort data rows in a *MergeBlock*. The out-of-the-box available UI (ribbon and dialog boxes) will reflect these new improvements. The *Insert Merge Block*  dialog box, that inserts a new merge block based on the connected data from the TXTextControl.DocumentServer.DataSources.DataSourceManager class, has a new button to specify data shaping settings:

![Data Shaping in TX Text Control X16](https://s1-www.textcontrol.com/assets/dist/blog/2018/04/26/a/assets/data_shaping1.webp "Data Shaping in TX Text Control X16")

A typical merge block listing orders looks like shown in the following screenshot:

![Merge Block](https://s1-www.textcontrol.com/assets/dist/blog/2018/04/26/a/assets/block.webp "Merge Block")

After merging, the table gets expanded with all block data rows:

![Merge Block](https://s1-www.textcontrol.com/assets/dist/blog/2018/04/26/a/assets/block_merged.webp "Merge Block")

### Sorting

In the new *Filter and Sort* dialog box, this list gets sorted ascending by price. It is also possible to set multiple sorting conditions:

![Data Shaping in TX Text Control X16](https://s1-www.textcontrol.com/assets/dist/blog/2018/04/26/a/assets/dialog_sort.webp "Data Shaping in TX Text Control X16")

The following screenshot shows the same list, but sorted by price ascending:

![Merge Block](https://s1-www.textcontrol.com/assets/dist/blog/2018/04/26/a/assets/block_merged_sorted.webp "Merge Block")

### Filter

Next, all entries where *UnitPrice* is over $800.00 are filtered out. In the dialog, the positive entries are selected: All rows with *UnitPrice* are less than *800*:

![Data Shaping in TX Text Control X16](https://s1-www.textcontrol.com/assets/dist/blog/2018/04/26/a/assets/block_merged_filter.webp "Data Shaping in TX Text Control X16")

![Merge Block](https://s1-www.textcontrol.com/assets/dist/blog/2018/04/26/a/assets/block_merged_sorted_display.webp "Merge Block")

All of these settings can be set programmatically using new properties of the *MergeBlockInfo* class: *SortingInstructions* and *Filters*. Additionally, the *BlockMergingCondition* specifies a condition the parent data row of this merge block has to satisfy, so that this merge block is merged at all.

This enables very flexible data structures and data shaping options in TX Text Control based reporting applications. Stay tuned for more exciting new features coming in version X16.

Let us know what you think about this - we would love to get your feedback on these features.

---

## 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)

---

## Series

- [Sneak Peek X16: Excel Formulas and MailMerge](https://www.textcontrol.com/blog/2018/10/30/sneak-peel-x16-excel-formulas-and-mailmerge/llms.txt)
- [Sneak Peek X16: MS Word Compatible Track Changes](https://www.textcontrol.com/blog/2018/04/24/sneak-peek-x16-ms-word-compatible-track-changes/llms.txt)
- **Sneak Peek X16: Filter and Sort MergeBlock Rows** (this article)
- [Sneak Peek X16: New Customizable Sidebar Controls](https://www.textcontrol.com/blog/2018/05/02/sneak-peek-x16-new-customizable-sidebar-controls/llms.txt)
- [Sneak Peek X16: Working with Formulas in Table Cells](https://www.textcontrol.com/blog/2018/07/25/sneak-peek-working-with-formulas-in-table-cells/llms.txt)
- [Sneak Peek X16: Selecting Reference Cells for Table Formulas](https://www.textcontrol.com/blog/2018/10/03/sneak-peek-x16-select-reference-cells-for-table-formulas/llms.txt)

---

## Related Posts

- [TX Text Control 32.0 Has Been Released](https://www.textcontrol.com/blog/2023/09/13/tx-text-control-320-has-been-released/llms.txt)
- [TX Text Control 31.0 and TX Spell .NET 10.0 Have Been Released](https://www.textcontrol.com/blog/2022/09/07/tx-text-control-31-released/llms.txt)
- [TX Text Control 30.0 and TX Spell .NET 9.0 Have Been Released](https://www.textcontrol.com/blog/2021/11/29/tx-text-control-30-released/llms.txt)
- [TX Text Control X19 and TX Spell 8.0 Have Been Released](https://www.textcontrol.com/blog/2020/12/02/tx-text-control-x19-released/llms.txt)
- [TX Text Control X18 has been Released](https://www.textcontrol.com/blog/2020/03/16/tx-text-control-x18-released/llms.txt)
- [TX Text Control X17 has been Released](https://www.textcontrol.com/blog/2019/05/28/tx-text-control-x17-released/llms.txt)
- [Text Control Roadmap 2019: High DPI Support, Forms, Node.js and Angular](https://www.textcontrol.com/blog/2019/03/12/text-control-roadmap-2019/llms.txt)
- [TX Text Control X16 and TX Barcode .NET 5.0 Released](https://www.textcontrol.com/blog/2018/11/14/tx-text-control-x16-and-tx-barcode-net-50-released/llms.txt)
- [X15: Merging Data into Chart Objects](https://www.textcontrol.com/blog/2018/01/05/merging-data-into-charts/llms.txt)
- [TX Text Control X15 and TX Spell .NET 7.0 Released](https://www.textcontrol.com/blog/2017/12/13/tx-text-control-x15-and-tx-spell-net-70-released/llms.txt)
- [Sneak Peek X15: MS Word Compatible Document Protection and Editable Regions](https://www.textcontrol.com/blog/2017/11/16/ms-word-compatible-editable-regions/llms.txt)
- [X14 Preview: Build Your Own Template Designer with the New DataSourceManager Class](https://www.textcontrol.com/blog/2016/11/15/x14-preview-build-your-own-template-designer-with-the-new-datasourcemanager-class/llms.txt)
- [TX Text Control 34.0 SP5 is Now Available: What's New in the Latest Version](https://www.textcontrol.com/blog/2026/09/14/tx-text-control-34-0-sp5-is-now-available/llms.txt)
- [TX Text Control 34.0 SP4 is Now Available: What's New in the Latest Version](https://www.textcontrol.com/blog/2026/05/20/tx-text-control-34-0-sp4-is-now-available/llms.txt)
- [TX Spell .NET 11.0 SP1 is Now Available: What's New in the Latest Version](https://www.textcontrol.com/blog/2026/04/08/tx-spell-net-11-0-sp1-is-now-available/llms.txt)
- [TX Text Control 34.0 SP2 is Now Available: What's New in the Latest Version](https://www.textcontrol.com/blog/2026/02/18/tx-text-control-34-0-sp2-is-now-available/llms.txt)
- [TX Text Control 34.0 SP1 is Now Available: What's New in the Latest Version](https://www.textcontrol.com/blog/2025/12/03/tx-text-control-34-0-sp1-is-now-available/llms.txt)
- [Introducing TX Text Control 34.0: Your Next Leap in Document Processing](https://www.textcontrol.com/blog/2025/11/10/introducing-tx-text-control-34-0-your-next-leap-in-document-processing/llms.txt)
- [Sneak Peek: TX Text Control 34.0 Coming November 2025](https://www.textcontrol.com/blog/2025/10/02/sneak-peek-tx-text-control-34-0-coming-november-2025/llms.txt)
- [TX Text Control 33.0 SP3 is Now Available: What's New in the Latest Version](https://www.textcontrol.com/blog/2025/08/14/tx-text-control-33-0-sp3-is-now-available/llms.txt)
- [TX Text Control 33.0 SP2 is Now Available: What's New in the Latest Version](https://www.textcontrol.com/blog/2025/06/18/tx-text-control-33-0-sp2-is-now-available/llms.txt)
- [Service Pack Releases: What's New in TX Text Control 33.0 SP1 and 32.0 SP5](https://www.textcontrol.com/blog/2025/05/07/service-pack-releases-whats-new-in-tx-text-control-33-0-sp1-and-32-0-sp5/llms.txt)
- [The Wait is Over: TX Text Control for Linux is Officially Here](https://www.textcontrol.com/blog/2025/03/12/the-wait-is-over-tx-text-control-for-linux-is-officially-here/llms.txt)
- [Full .NET 9 Support in Text Control .NET Components for ASP.NET Core, Windows Forms, and WPF](https://www.textcontrol.com/blog/2024/11/11/full-net-9-support-in-text-control-net-components-for-asp-net-core-windows-forms-and-wpf/llms.txt)
- [TX Text Control 32.0 Service Pack 4 Released](https://www.textcontrol.com/blog/2024/09/02/tx-text-control-32-0-service-pack-4-released/llms.txt)
