# ReportingCloud: New MergeSettings property to remove empty lines

> The ReportingCloud Web API adds a removeEmptyLines property to MergeSettings that removes blank lines from merged documents when all merge fields on a line are empty. This prevents unwanted gaps in address blocks, form letters, and templates where optional data fields may be missing.

- **Author:** Bjoern Meyer
- **Published:** 2019-05-10
- **Modified:** 2026-07-17
- **Description:** The ReportingCloud Web API adds a removeEmptyLines property to MergeSettings that removes blank lines from merged documents when all merge fields on a line are empty. This prevents unwanted gaps in address blocks, form letters, and templates where optional data fields may be missing.
- **2 min read** (226 words)
- **Tags:**
  - Reporting
  - ReportingCloud
- **Web URL:** https://www.textcontrol.com/blog/2019/05/10/new-mergesettings-property-to-remove-empty-lines/
- **LLMs URL:** https://www.textcontrol.com/blog/2019/05/10/new-mergesettings-property-to-remove-empty-lines/llms.txt
- **LLMs-Full URL:** https://www.textcontrol.com/blog/2019/05/10/new-mergesettings-property-to-remove-empty-lines/llms-full.txt

---

We just rolled out a new [MergeSettings](https://docs.reporting.cloud/docs/endpoint/document/merge#MergeSettings-Post) property that can be used to remove a complete line, if this line consists of empty merge fields only.

Consider the following template segment:

![Template](https://s1-www.textcontrol.com/assets/dist/blog/2019/05/10/a/assets/template.webp "Template")

The following class is our data source for the merge process:

```
public class Report
{
    public string name { get; set; }
    public string company { get; set; }
    public string blank { get; set; }
}
```

When the merge field *blank* is not used (is empty), an empty blank line will be rendered:

```
Report report = new Report()
{
    company = "Text Control, LLC",
    name = "Bjoern Meyer"
};

TXTextControl.ReportingCloud.ReportingCloud rc = 
    new TXTextControl.ReportingCloud.ReportingCloud(
        "user@domain.com", 
        "yourpassword", 
        new Uri("https://api.reporting.cloud/"));

MergeBody body = new MergeBody()
{
    MergeData = report
};

List<byte[]> documents = rc.MergeDocument(body, "RemoveEmptyLines.tx", ReturnFormat.TX);
```

![Template](https://s1-www.textcontrol.com/assets/dist/blog/2019/05/10/a/assets/blankline.webp "Template")

When the *removeEmptyLines* property is set to *true*, this empty line gets removed when merging the document:

```
MergeBody body = new MergeBody()
{
    MergeData = report,
    MergeSettings = new MergeSettings()
    {
        RemoveEmptyLines = true
    }
};
```

![Template](https://s1-www.textcontrol.com/assets/dist/blog/2019/05/10/a/assets/removedline.webp "Template")

Read more about the optional *MergeSettings* in the Web API references at:

[docs.reporting.cloud](https://docs.reporting.cloud/docs/endpoint/document/merge#MergeSettings-Post)

Happy coding!

---

## 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

- [New Endpoint: Manipulating Tracked Changes in Documents](https://www.textcontrol.com/blog/2019/08/09/manipulating-tracked-changes-in-documents/llms.txt)
- [Impressions from Developer Days Magdeburg 2019](https://www.textcontrol.com/blog/2019/05/23/impressions-from-developer-days-magdeburg-2019/llms.txt)
- [See Text Control at DEVintersection, Orlando](https://www.textcontrol.com/blog/2019/05/15/see-text-control-at-devintersection-orlando/llms.txt)
- [Impressions from dotnet Cologne 2019](https://www.textcontrol.com/blog/2019/05/13/impressions-from-dotnet-cologne-2019/llms.txt)
- [Creating Templates: Typical Invoice Elements](https://www.textcontrol.com/blog/2019/04/16/typical-invoice-elements/llms.txt)
- [See Text Control in Germany for dotnet Cologne 2019](https://www.textcontrol.com/blog/2019/04/13/see-text-control-at-dotnet-cologne-2019/llms.txt)
- [ReportingCloud: Web API Health Status Page](https://www.textcontrol.com/blog/2019/04/09/reportingcloud-health-status-page/llms.txt)
- [Impressions from BASTA! Spring 2019](https://www.textcontrol.com/blog/2019/03/01/impressions-from-basta-spring-2019/llms.txt)
- [ReportingCloud: Extract Plain Text from Adobe PDF, MS Word or HTML Documents](https://www.textcontrol.com/blog/2019/02/20/extract-plain-text-adobe-pdf-using-reportingcloud/llms.txt)
- [Create your First Document with ReportingCloud](https://www.textcontrol.com/blog/2019/02/19/create-your-first-document-with-reportingcloud/llms.txt)
- [ReportingCloud: Open Source Documentation Released](https://www.textcontrol.com/blog/2019/02/11/open-source-documentation-released/llms.txt)
- [Impressions from NDC London 2019](https://www.textcontrol.com/blog/2019/02/04/impressions-from-ndc-london-2019/llms.txt)
- [ReportingCloud: Backend Updated to TX Text Control X16](https://www.textcontrol.com/blog/2019/01/03/impact-of-the-azure-reboot-strategy/llms.txt)
- [Impressions from DevIntersection and the Azure and AI Conference in Las Vegas](https://www.textcontrol.com/blog/2018/12/07/impressions-from-devintersection-and-the-azure-and-ai-conference/llms.txt)
- [Impressions from DDC Cologne](https://www.textcontrol.com/blog/2018/11/30/impressions-from-ddc-cologne/llms.txt)
- [Text Control as a Service: Outsource Your Document Processes](https://www.textcontrol.com/blog/2018/10/08/text-control-as-a-service-outsource-your-document-processes/llms.txt)
- [New ReportingCloud Endpoint: Appending Documents](https://www.textcontrol.com/blog/2018/10/01/new-reportingcloud-endpoint-appending-documents/llms.txt)
- [ReportingCloud Monthly Payment Available](https://www.textcontrol.com/blog/2018/09/18/reportingcloud-monthly-payment-available/llms.txt)
- [Integrate Documents in any Platform: Visit us at BASTA! 2018](https://www.textcontrol.com/blog/2018/09/06/first-impressions-of-that-conference-2018/llms.txt)
- [ReportingCloud: Retrieve User Defined Properties from Templates](https://www.textcontrol.com/blog/2018/07/27/retrieve-user-defined-properties-from-templates/llms.txt)
- [Edit Templates in an ASP.NET Core MVC Application (.NET Core)](https://www.textcontrol.com/blog/2018/07/18/edit-templates-in-a-net-core-mvc-application/llms.txt)
- [ReportingCloud Editor Widget Released to Beta](https://www.textcontrol.com/blog/2018/07/13/reportingcloud-editor-widget-released-to-beta/llms.txt)
- [See Text Control at THAT Conference in Wisconsin](https://www.textcontrol.com/blog/2018/07/09/see-text-control-at-that-conference-in-wisconsin/llms.txt)
- [ReportingCloud: GDPR Data Processing Agreement and Statistics](https://www.textcontrol.com/blog/2018/05/08/reportingcloud-gdpr-data-processing-agreement-and-statistics/llms.txt)
- [ReportingCloud Upgraded to TX Text Control X15 - New Features](https://www.textcontrol.com/blog/2018/01/08/reportingcloud-upgraded-to-tx-text-control-x15/llms.txt)
