New ReportingCloud MergeSettings Option: Merge HTML Content into Merge Fields
ReportingCloud adds a mergeHtml property to MergeSettings that accepts formatted HTML inside merge field data. Supported tags include strong, em, and u wrapped in an html root element. The original font name, size, color, and background color are preserved after the merge.

One of the most requested features for ReportingCloud is a way to merge formatted content into merge fields. We have added this feature to the API and rolled it out last weekend.
The MergeSettings object used in the Merge method received the new property mergeHtml that specifies whether field data can contain formatted HTML content or not.
If this property is set to true, field data can contain simple HTML formatting such as <strong>, <em> and <u>. The complete field data string must be enclosed in an <html> tag element:
<html><strong>Strong text</strong> and <em>emphasized text</em></html>
In most cases, this feature has been requested to merge formatted comments into templates. Consider the following sample template:

The following code uses the ReportingCloud .NET Wrapper which is available as a NuGet package:
Report report = new Report();
report.comments = "<html><strong>Longer strong text</strong>";
report.comments += "with normal text and <em>emphasized text</em></html>";
ReportingCloud rc = new ReportingCloud("username", "password");
MergeBody body = new MergeBody();
body.MergeData = report;
body.MergeSettings = new MergeSettings() { MergeHtml = true };
List<byte[]> documents = rc.MergeDocument(
body,
"comments.tx",
ReturnFormat.TX,
true,
false);
The screenshot below shows the formatted HTML that has been merged into the merge field:

The initial font name, font-size, color and font background color will be maintained on updating the text during the merge process.
Test this on your own and create a ReportingCloud trial account today.
Happy coding!
Cloud
Are we moving to the cloud? This question is changing from "if" to "when" and "how". Text Control ReportingCloud brings complete reporting functionality to the cloud so all developers can use it, irrespective of the platform or language they're using. Its highly RESTful API can be used to merge Microsoft Word compatible templates with JSON data from all clients including .NET, Javascript, PHP, Node.JS, jQuery, Ruby, Python, Android, Java and iOS.
Related Posts
Proofing Tools Available As ReportingCloud Web API Endpoints
ReportingCloud introduces three proofing Web API endpoints for cloud-based spell checking. The proofing/check endpoint detects misspelled words and duplicates, proofing/suggestions returns ranked…
All Google Fonts Now Available in ReportingCloud
ReportingCloud now includes over 2000 Google Fonts on its servers, ensuring consistent rendering across merged documents. The fonts/list endpoint returns all available font names for programmatic…
New ReportingCloud Endpoint: List Available Fonts
ReportingCloud adds a fonts/list API endpoint that returns all font names available for template creation and merge operations. Developers use this to verify that uploaded RTF, DOC, or DOCX…
What Can You Do with the ReportingCloud RESTful Service?
ReportingCloud merges MS Word templates with JSON data via the /v1/document/merge endpoint, supporting nested master-detail blocks, merge settings, and output as PDF, DOCX, RTF, or HTML.…
Render Document Pages As Images Using the ReportingCloud REST Web API
The ReportingCloud /v1/templates/thumbnails endpoint renders document pages as PNG, JPG, BMP, or GIF images. Query parameters control zoom factor from 1-400, page range, and output format.…
