TX Text Control .NET for Windows Forms

MergeBlockInfo Class

Class|Introduced in 24.0
Namespace
TXTextControl.DocumentServer.DataSources
Package
TXTextControl.TextControl.WinForms.SDK from the private NuGet feed or Text Control Offline Packages
Assembly
TXDocumentServer.dll
Install
dotnet add package TXTextControl.TextControl.WinForms.SDK .NET 8 and later. For .NET Framework, reference TXDocumentServer.dll from the setup.

Description

The MergeBlockInfo class is used to insert a table or paragraph based repeating merge block into a TextControl instance using the DataSourceManager.InsertMergeBlock method.

Syntax

public class MergeBlockInfo

Examples

The following example creates a Merge Block Info instance for a document-processing operation. The created object is then available to the surrounding document workflow.

TXTextControl.DocumentServer.DataSources.MergeBlockInfo mergeBlockInfo = new("CustomerName");
Console.WriteLine("Merge Block Info is ready for use.");

Members

Constructors

ConstructorDescription
MergeBlockInfoInitializes a new instance of the MergeBlockInfo class.

Properties

PropertyDescription
BlockMergingConditionGets or sets a condition the parent data row of this merge block has to satisfy so that this merge block is merged at all. To keep the merge block independent of a condition just leave this property at the default value null.
ChildBlocksGets or sets the list of merge blocks nested inside this merge block.
ColumnNamesGets or sets the list of data column names which represent the merge fields this merge block consists of.
FiltersGets or sets a list of filter instructions which are used to filter the data rows before merging. To not filter the block data, just leave this property empty or set it to null.
MergeFieldsReturns the merge fields inside this merge block excluding fields in possible nested merge blocks.
SortingInstructionsGets or sets a list of sorting instructions which are used to sort the data rows before merging. To not sort the block data, just leave this property empty or set it to null.
TableNameGets the table name of this merge block.

Methods

MethodDescription
ApplyStores the meta data (filters, sorting instructions and the block merging condition) in the SubTextPart which represents the block. Manipulating any of the aforementioned collections does not update the block automatically, so this method must be called to actually store changes. If a MergeBlockInfo instance is not based on an existing SubTextPart, this method throws an exception.

Further Reading

  • DataSourceManager: Using the Ready-to-Use Reporting Dialog Boxes –
  • Sneak Peek X16: Filter and Sort MergeBlock Rows –