Products Technologies Demo Docs Blog Support Company

X15: Merging Data into Chart Objects

This article explains how to merge data into chart objects using the TX Text Control reporting engine MailMerge.

X15: Merging Data into Chart Objects

Version X15 comes with new Chart Tools ribbon tabs in the TX Text Control ribbon bar in all .NET platforms including Windows Forms, WPF and ASP.NET. They allow users to insert and adjust chart objects out-of-the-box.

In order to insert a new chart object, simply use the Chart drop-down button in the Illustrations ribbon group of the Insert tab and select the preferred chart type.

Inserting charts

When selecting a chart object, the contextual ribbon groups Frame Formatting and Chart Formatting are available to adjust the object.

Modify charts

When a data source is loaded in the Reporting tab, a chart object can be directly bound to a data table. Consider the following XML as a data source for a report:

<reports>
    <report>
        <name>Report1</name>
        <sales>
            <month>January</month>
            <amount>1000</amount>
        </sales>
        <sales>
            <month>February</month>
            <amount>2000</amount>
        </sales>
        <sales>
            <month>March</month>
            <amount>8000</amount>
        </sales>
        <sales>
            <month>April</month>
            <amount>5000</amount>
        </sales>
    </report>
    <report>
        <name>Report2</name>
        <sales>
            <month>January</month>
            <amount>5353</amount>
        </sales>
        <sales>
            <month>February</month>
            <amount>3453</amount>
        </sales>
        <sales>
            <month>March</month>
            <amount>7899</amount>
        </sales>
        <sales>
            <month>April</month>
            <amount>3455</amount>
        </sales>
    </report>
</reports>

Select the chart object, find and click the Set Data Relation button in the Chart Formatting contextual ribbon tab. In the opened dialog, select the master table which is report in this sample case. The child table that contains the sales numbers for our chart object is sales. The axis should be labeled with the values of the column month and the values should be retrieved from the column amount. Close this dialog by clicking OK.

Chart data dialog

In the Reporting tab, select Preview and confirm the dialog with OK to see the following result:

Merged chart

When merging this template programmatically using TXTextControl.DocumentServer.MailMerge class, chart objects are merged automatically based on the relation specified in the template.

Stay in the loop!

Subscribe to the newsletter to receive the latest updates.

Also See

This post references the following in the documentation:

  • TXTextControl.DocumentServer.MailMerge Class

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

ActiveXASP.NETReporting

TX Text Control 32.0 Has Been Released

We are pleased to announce the immediate availability of TX Text Control 32.0 for all platforms including ASP.NET, Windows Forms, WPF and ActiveX.


ActiveXASP.NETReporting

TX Text Control 31.0 and TX Spell .NET 10.0 Have Been Released

We are happy to announce the immediate availability of TX Text Control 31.0 for all platforms including ASP.NET, Windows Forms, WPF and ActiveX and TX Spell .NET 10.0 for all .NET based platforms.


ActiveXASP.NETReporting

TX Text Control 30.0 and TX Spell .NET 9.0 Have Been Released

We are happy to announce the immediate availability of TX Text Control 30.0 for all platforms including ASP.NET, Windows Forms, WPF and ActiveX and TX Spell .NET 9.0 for all .NET based platforms.


ActiveXASP.NETReporting

TX Text Control X19 and TX Spell 8.0 Have Been Released

We are happy to announce the immediate availability of TX Text Control X19 for all platforms including Windows Forms, WPF and ASP.NET and TX Spell .NET 8 for all .NET based platforms.


ActiveXASP.NETReporting

TX Text Control X18 has been Released

We are happy to announce the immediate availability of TX Text Control X18.