The TXTextControl.DocumentServer.MailMerge.FieldMerged event TX Text Control .NET for Windows Forms
DocumentServer Namespace
MailMerge Class
FieldMerged Event
Occurs when a field has been merged.
returns useful information and options to manipulate the merged content in the TXTextControl.DocumentServer.MailMerge.FieldMergedEventArgs class TX Text Control .NET for Windows Forms
DocumentServer Namespace
MailMerge.FieldMergedEventArgs Class
The FieldMergedEventArgs class provides data for the FieldMerged event.
.

Since version X14 (24.0), the TXTextControl.DocumentServer.MailMerge.FieldMergedEventArgs.TableCell property TX Text Control .NET for Windows Forms
DocumentServer Namespace
MailMerge.FieldMergedEventArgs Class
TableCell Property
If the merge field is inside of a table, this property returns the containing table cell as a TXTextControl.TableCell instance or null otherwise.
returns a TXTextControl.TableCell class TX Text Control .NET for Windows Forms
TXTextControl Namespace
TableCell Class
An instance of the TableCell class represents a single cell of a table in a Text Control document.
in case the merge field is positioned inside a table. This can be used to manipulate the table cell based on merged values.

Consider the following data structure and instance that is used to merge a template:

Loading...

The following code creates a new instance of the reporting engine TXTextControl.DocumentServer.MailMerge class TX Text Control .NET for Windows Forms
DocumentServer Namespace
MailMerge Class
The MailMerge class is a .NET component that can be used to effortlessly merge template documents with database content in .NET projects, such as ASP.NET web applications, web services or Windows services.
, attaches the FieldMerged event and calls the TXTextControl.DocumentServer.MailMerge.MergeObjects method TX Text Control .NET for Windows Forms
DocumentServer Namespace
MailMerge Class
MergeObjects Method
Merges a collection of type System.Collections.IEnumerable containing objects of any type or instances of type System.Collections.Generic.Dictionary with string keys into the loaded document template.
to merge a template with the created data object.

Loading...

In the FieldMerged event, the field value is parsed and mapped to a color based on the value range. Accordingly, the background color of the outer table cell is highlighted.

Loading...

The following screenshot shows the results of this merge process:

Colored table cells

This is just one of many ideas what to do with the flexible reporting framework MailMerge to customize the merging process.