# Alternate Row Colors Using NEXT Fields

> The TX Text Control MailMerge engine supports alternating row colors by using NEXT fields within merge blocks. Placing a NEXT field at the end of a table row advances to the next data record mid-page, allowing two differently styled rows to repeat as visual pairs in the output.

- **Author:** Bjoern Meyer
- **Published:** 2013-12-30
- **Modified:** 2026-03-05
- **Description:** The TX Text Control MailMerge engine supports alternating row colors by using NEXT fields within merge blocks. Placing a NEXT field at the end of a table row advances to the next data record mid-page, allowing two differently styled rows to repeat as visual pairs in the output.
- **2 min read** (314 words)
- **Tags:**
  - Reporting
  - Sample
- **Web URL:** https://www.textcontrol.com/blog/2013/12/30/alternate-row-colors-using-next-fields/
- **LLMs URL:** https://www.textcontrol.com/blog/2013/12/30/alternate-row-colors-using-next-fields/llms.txt
- **LLMs-Full URL:** https://www.textcontrol.com/blog/2013/12/30/alternate-row-colors-using-next-fields/llms-full.txt

---

It is important to adjust the display of your tabular data in order to improve the readability. Reading large sets of numbers in long tables can be hard and there are easy ways to improve that. A smart way to accomplish this task are alternating row colors.

Using TX Text Control's reporting engine MailMerge, you can design your table including the style for alternating rows in the template designer. The following screenshot shows how the template looks like:

![Alternate row colors using NEXT fields](https://s1-www.textcontrol.com/assets/dist/blog/2013/12/30/a/assets/tx_alternating.webp "Alternate row colors using NEXT fields")The merge block range includes two table rows that contain identical merge fields. The background color of the second table row is different. In fact, you could also have different merge fields in those rows. At the end of the first row, a **NEXT** field has been added which switches to the next data record in the middle of a page.

In this sample, the next record is merged into the second table row before a new block is merged. Thanks to the flexibility of MailMerge, you can also define more than 2 different rows. The following screenshot shows how the resulting table looks like after the data has been merged:

![Alternate row colors using NEXT fields](https://s1-www.textcontrol.com/assets/dist/blog/2013/12/30/a/assets/tx_alternating_results.webp "Alternate row colors using NEXT fields")You can test this feature in the shipped template designer **TX Text Control Words**.

Test Alternating Row Colors
---------------------------

- [Download](https://s1-www.textcontrol.com/assets/dist/blog/2013/12/30/a/assets/template.tx) the sample template.
- Open TX Text Control Words and load the template.
- In the *Mailings* ribbon tab, click on *Load Sample Database* from the *Select Data Source* drop-down button.
- Click on *Preview Merge Fields* from the *Preview* ribbon group.

---

## 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 Conference Badges with Text Control Reporting](https://www.textcontrol.com/blog/2017/02/14/creating-conference-badges-with-text-control-reporting/llms.txt)
- [Reporting: Merging MS Word Documents with DocVariables](https://www.textcontrol.com/blog/2015/06/10/reporting-merging-ms-word-documents-with-docvariables/llms.txt)
- [Mail Merge: Suppress Lines with Empty Merge Fields](https://www.textcontrol.com/blog/2014/08/01/mail-merge-suppress-lines-with-empty-merge-fields/llms.txt)
- [Creating Reports with TX Text Control](https://www.textcontrol.com/blog/2003/03/28/creating-reports-with-tx-text-control/llms.txt)
- [C# Document Generation: A Developer's Guide for .NET](https://www.textcontrol.com/blog/2026/07/08/csharp-document-generation-developer-guide-for-dotnet/llms.txt)
- [Convert SSRS RDL Reports to DOCX and TX Text Control Templates in .NET C#](https://www.textcontrol.com/blog/2026/06/22/convert-ssrs-rdl-reports-to-docx-and-tx-text-control-templates-in-dotnet-csharp/llms.txt)
- [.NET C# PDF Generation Techniques: Which Method is Right for Your Project?](https://www.textcontrol.com/blog/2024/10/30/net-csharp-pdf-generation-techniques-which-method-is-right-for-your-project/llms.txt)
- [Best Practices for Mail Merge and Form Field Processing in ASP.NET Core C# Applications](https://www.textcontrol.com/blog/2024/07/30/best-practices-for-mail-merge-and-form-field-processing-in-asp-net-core-csharp-applications/llms.txt)
- [Advantages of Flow Type Layout Reporting vs. Banded Reporting or PDF Template Engines in .NET C#](https://www.textcontrol.com/blog/2024/07/29/advantages-of-flow-type-layout-reporting-vs-banded-reporting-or-pdf-template-engines-in-net-c-sharp/llms.txt)
- [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)
- [Getting Started: Angular Document Editor Attributes Explained](https://www.textcontrol.com/blog/2023/02/01/getting-started-angular-document-editor-attributes-explained/llms.txt)
- [Getting Started: Programming the Angular Document Editor using JavaScript](https://www.textcontrol.com/blog/2023/01/30/getting-started-programming-the-angular-document-editor-using-javascript/llms.txt)
- [Getting Started: Loading and Saving Documents using Angular](https://www.textcontrol.com/blog/2023/01/30/loading-and-saving-documents-using-angular/llms.txt)
- [Create a Table of Contents in Windows Forms using C#](https://www.textcontrol.com/blog/2023/01/23/create-toc-in-windows-forms/llms.txt)
- [Official TX Text Control .NET Sample Applications Are Now Hosted on GitHub](https://www.textcontrol.com/blog/2023/01/08/official-tx-text-control-net-sample-applications-are-now-hosted-on-github/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)
- [Detect Toggle Button Changes Using a MutationObserver](https://www.textcontrol.com/blog/2021/11/11/detect-toggle-button-changes-using-a-mutationobserver/llms.txt)
- [Two Ways to Restart Numbered Lists in TX Text Control](https://www.textcontrol.com/blog/2021/11/03/two-ways-to-restart-numbered-lists/llms.txt)
- [Zoom Tricks: Disabling CTRL + MOUSE WHEEL and More](https://www.textcontrol.com/blog/2020/12/09/zoom-tricks-disabling-ctrl-mouse-wheel-and-more/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 for Angular X18 Published](https://www.textcontrol.com/blog/2020/03/18/tx-text-control-for-angular-x18-published/llms.txt)
- [MVC NuGet Packages for X18 Published](https://www.textcontrol.com/blog/2020/03/17/mvc-nuget-packages-for-x18-published/llms.txt)
- [TX Text Control X18 has been Released](https://www.textcontrol.com/blog/2020/03/16/tx-text-control-x18-released/llms.txt)
- [Impressions from NDC London 2020](https://www.textcontrol.com/blog/2020/02/01/impressions-from-ndc-london-2020/llms.txt)
