Products Technologies Demo Docs Blog Support Company

Reporting: Repeating Blocks with Breaks and Without

Merge blocks in Text Control Reporting repeat their content for each data row in the source. The repeated content can be a table row, paragraph, or inline text. Adding CRLF, page break, section break, or column break characters between repetitions controls the output layout.

Reporting: Repeating Blocks with Breaks and Without

Repeating blocks or merge blocks is a very flexible feature with Text Control Reporting. The content of a block is repeated based on the number of data rows that are passed to this block. Generally, you can repeat everything: A table row, a complete table, paragraphs or a single word. All break characters are repeated and applied automatically.

To insert a new merge block in TX Text Control Words - the Text Control Reporting template designer - the following easy steps are required:

  • Create a paragraph, table or whatever you want to repeat and add some fields:

    Create a merge block
  • Select that part of the text that should belong to the repeating block and choose an available block from the Insert Merge Block drop-down button:

    Create a merge block

Consider the following block (between the two block markers) where product names should be listed in the same paragraph:

Reporting: Repeating blocks with breaks and without

When merging this block, the products are repeated in inline:

Reporting: Repeating blocks with breaks and without

When adding the CLRF ("carriage return line feed") control character to the block, a new paragraph is inserted for each block:

Reporting: Repeating blocks with breaks and without

The resulting document is shown below:

Reporting: Repeating blocks with breaks and without

Instead of a new paragraph after the block, you can also insert a page break, section break or column break that are applied automatically during the merge process.

Stay in the loop!

Subscribe to the newsletter to receive the latest updates.

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.

See Reporting products

Related Posts

ASP.NETReportingHTML5

Creating Your First ASP.NET Reporting Application

The MailMerge and ServerTextControl components of TX Text Control .NET Server for ASP.NET enable server-side reporting in Web Forms. A template.docx merges with XML data via a button click…


ASP.NETReportingTutorial

New Online Sample: Build your First Report

A new interactive online demo walks through building a report with TX Text Control in three steps: preparing JSON data in a live editor, creating a template with merge fields and repeating blocks,…


ReportingDocumentationReportingCloud

Create your First Document with ReportingCloud

ReportingCloud documentation now includes interactive tutorials for creating documents without code. Users enter an API key, choose a format such as PDF or DOCX, customize the merge data payload,…


CloudReportingMail Merge

MailMerge: Starting Each Merge Block on a New Page

Merge blocks in TX Text Control repeat based on matching data rows. Applying ParagraphFormat.PageBreakBefore to the first paragraph of a block forces each repetition onto a new page. Section…


ReportingTutorialWeb API

Using MailMerge with JSON Data

Merge document templates with JSON data using TX Text Control MailMerge by converting nested JSON strings into DataSet objects via Newtonsoft.Json. The JSON is first transformed to XML, then…

Share on this blog post on: