Alternate Row Colors Using NEXT Fields
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: The merge block range includes…

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:

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:

You can test this feature in the shipped template designer TX Text Control Words.
Test Alternating Row Colors
- Download 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.
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.
Related Posts
Creating Conference Badges with Text Control Reporting
On May 10-11 2017, the Magdeburger Developer Days are taking place the second time in Magdeburg, Germany. In 40+ sessions, top speakers talk about .NET, Java, web technologies, databases and ALM.…
Reporting: Merging MS Word Documents with DocVariables
TX Text Control supports all MS Word fields including the typical merge fields, content control fields, legacy form fields or special fields such as DOCVARIABLE. All of those fields can be found…
Mail Merge: Suppress Lines with Empty Merge Fields
Consider an address block with several merge fields in a mail merge letter. Some fields might be empty such as the firstname and name. If no data is available for those fields, the complete line…
Creating Reports with TX Text Control
A detailed and lusciously illustrated tutorial that shows you how to create a repot generating program with TX Text Control. Source code and Visual Basic project file included.
.NET C# PDF Generation Techniques: Which Method is Right for Your Project?
This article explains the distinct advantage TX Text Control offers with its true WYSIWYG (What You See Is What You Get) template system, where templates are designed visually, similar to…