Products Technologies Demo Docs Blog Support Company

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, and merging the template to view the final document in the DocumentViewer component.

New Online Sample: Build your First Report

We just added a new interactive sample to our online demos that shows how to create your first report using TX Text Control. The idea to show the process of creating a document step by step beginning with preparing the data, creating the template to merging them together.

In the first step, JSON sample data is loaded into a JSON editor that can modified for testing purposes. Each time, data is changed in the editor, the drop-down boxes in the editor (step 2) are updated using the following code:

editor.getSession().on('change', function () {
    try {
        $("#editor").notify("Data model updated!", { className: "success" });

        var jsonData = editor.getValue();
        JSON.parse(jsonData);
        TXTextControl.loadJsonData(jsonData);
    } catch (e) {
        return false;
    }
});

Preparing data

In step 2, the editor can be used to create a template. Use it to insert static text, headers and footers and other word processing elements into the template. Using the Insert Merge Field and Insert Merge Block buttons, merge fields and blocks associated to the connected data can be added.

Preparing the template

When the template is ready, the button Merge Template can be used to merge the template with the created data. The created document is then loaded into the DocumentViewer.

Merging the document

Test this demo on your own and create your first report using TX Text Control:

Launch demo

Stay in the loop!

Subscribe to the newsletter to receive the latest updates.

ASP.NET

Integrate document processing into your applications to create documents such as PDFs and MS Word documents, including client-side document editing, viewing, and electronic signatures.

ASP.NET Core
Angular
Blazor
JavaScript
React
  • Angular
  • Blazor
  • React
  • JavaScript
  • ASP.NET MVC, ASP.NET Core, and WebForms

Learn more Trial token Download trial

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.NETReportingGitHub

Merging Documents with RESTful Web API's

Build a RESTful ASP.NET Web API endpoint that accepts a TX Text Control template in InternalUnicodeFormat and a JSON data object, then executes a server-side MailMerge to return the merged…


ASP.NETReportingPDF

.NET C# PDF Generation Techniques: Which Method is Right for Your Project?

This article explains the distinct advantage TX Text Control offers with its true WYSIWYG (What You See Is What You Get) template system, where templates are designed visually, similar to…


ASP.NETReportingASP.NET Core

Best Practices for Mail Merge and Form Field Processing in ASP.NET Core C#…

This article provides best practices for mail merge and form field processing in ASP.NET Core C# applications using TX Text Control .NET Server. It shows how to use the Document Editor to create…


ASP.NETReportingASP.NET Core

Advantages of Flow Type Layout Reporting vs. Banded Reporting or PDF…

This article shows the advantages of flow type layout reporting compared to banded reporting or populating PDF placeholders in .NET C#. It explains the differences and the benefits of using a flow…

Share on this blog post on: