# Use Case: Blood Pressure Report with Charts in C#

> Providing human-readable reports in healthcare is an important part of improving transparency and patient satisfaction. This sample template shows how to visualize a series of blood pressure measurements in an easy-to-read report.

- **Author:** Bjoern Meyer
- **Published:** 2023-04-27
- **Modified:** 2026-07-17
- **Description:** Providing human-readable reports in healthcare is an important part of improving transparency and patient satisfaction. This sample template shows how to visualize a series of blood pressure measurements in an easy-to-read report.
- **5 min read** (928 words)
- **Tags:**
  - ASP.NET
  - MailMerge
  - ServerTextControl
  - Report
  - Template
  - Healthcare
- **Web URL:** https://www.textcontrol.com/blog/2023/04/27/use-case-blood-pressure-report-with-charts-in-csharp/
- **LLMs URL:** https://www.textcontrol.com/blog/2023/04/27/use-case-blood-pressure-report-with-charts-in-csharp/llms.txt
- **LLMs-Full URL:** https://www.textcontrol.com/blog/2023/04/27/use-case-blood-pressure-report-with-charts-in-csharp/llms-full.txt

---

Healthcare reports from laboratories or healthcare systems can be complex, providing data in a form that only practitioners can understand. Providing human-readable reports in healthcare is an important part of improving transparency and patient satisfaction.

With Healthcare as one of our main industries, where TX Text Control is used in various areas, we have some insights into how professional reporting and document processing can be used to create beautiful, readable reports.

The template discussed in this article uses blood pressure measurement data to generate two charts and a data table. All elements are explained, including the data source used, the chart diagrams, merge fields, and merge blocks.

The following screenshot shows the first two pages of the resulting report exported to PDF.

[![Healthcare Report with TX Text Control](https://s1-www.textcontrol.com/assets/dist/blog/2023/04/27/a/assets/report.webp "Healthcare Report with TX Text Control")](https://s1-www.textcontrol.com/assets/dist/blog/2023/04/27/a/assets/report.webp)

#### XML Data Source

The data source for the merge process is an XML file, which in many cases is the data exchange format for medical devices or the export format of health apps such as *Health* for iOS.

```
<?xml version="1.0" encoding="UTF-8" ?>

<reports>
  <report>
    <patient_name>Tim Typer</patient_name>
    <patient_dob>12/12/1980</patient_dob>
    <patient_age>43</patient_age>
    <measurements_start>1/1/2023</measurements_start>
    <measurements_end>3/31/2023</measurements_end>
    <measurements_avg_sys>115</measurements_avg_sys>
    <measurements_avg_dia>73</measurements_avg_dia>
    <measurements_avg_pulse>33</measurements_avg_pulse>
    <measurements>
        <Date>1/1/2023</Date>
        <Time>08:50</Time>
        <Systolic>108</Systolic>
        <Diastolic>63</Diastolic>
        <Pulse_Pressure>35</Pulse_Pressure>
        <Heart_Rate>60</Heart_Rate>
    </measurements>
    <measurements>
        <Date>1/2/2023</Date>
        <Time>08:56</Time>
        <Systolic>119</Systolic>
        <Diastolic>80</Diastolic>
        <Pulse_Pressure>37</Pulse_Pressure>
        <Heart_Rate>73</Heart_Rate>
    </measurements>

    ...
```

### Mail Merge Elements

The template consists of various mail merge elements including merge fields, merge blocks and charts. The header contains simple merge fields such as patient name and the date of birth:

![Healthcare Report with TX Text Control](https://s1-www.textcontrol.com/assets/dist/blog/2023/04/27/a/assets/template1.webp "Healthcare Report with TX Text Control")

In the first section of the report, the average blood pressure data is visualized as a number and a thumbs-up or thumbs-down depending on the values. This is done using two *IF* fields, one in green color and one in red. The true text for the green *IF* field is the Unicode "thumbs-up" character if the condition is met that the average value is less than 120. The red field is the opposite.

![Healthcare Report with TX Text Control](https://s1-www.textcontrol.com/assets/dist/blog/2023/04/27/a/assets/template2.webp "Healthcare Report with TX Text Control")

After the merge, when the positive conditions are met, the true text is rendered in green.

![Healthcare Report with TX Text Control](https://s1-www.textcontrol.com/assets/dist/blog/2023/04/27/a/assets/template3.webp "Healthcare Report with TX Text Control")

In a negative case, the second red field is rendered.

![Healthcare Report with TX Text Control](https://s1-www.textcontrol.com/assets/dist/blog/2023/04/27/a/assets/template4.webp "Healthcare Report with TX Text Control")

#### Data Charts

The first chart is of type radar that displays the systolic and diastolic data in the form of a two-dimensional chart to easily visualize spike areas.

For this chart, the main table is *report* and the associated child table is *measurements*. The systolic and diastolic values are used for the 2 axes.

![Healthcare Report with TX Text Control](https://s1-www.textcontrol.com/assets/dist/blog/2023/04/27/a/assets/template5.webp "Healthcare Report with TX Text Control")

To add the second value, add a second *Diastolic* line to the *Chart Data* dialog box.

![Healthcare Report with TX Text Control](https://s1-www.textcontrol.com/assets/dist/blog/2023/04/27/a/assets/template6.webp "Healthcare Report with TX Text Control")

After a successful merge, both measurements are used and visualized.

![Healthcare Report with TX Text Control](https://s1-www.textcontrol.com/assets/dist/blog/2023/04/27/a/assets/template7.webp "Healthcare Report with TX Text Control")

The second chart is a line chart with an additional value for the pulse pressure along with the systolic and diastolic values.

![Healthcare Report with TX Text Control](https://s1-www.textcontrol.com/assets/dist/blog/2023/04/27/a/assets/template8.webp "Healthcare Report with TX Text Control")

#### Data Table Merge Block

The data table is a repeating merge block that lists all measurement data in a clean table with a table header.

![Healthcare Report with TX Text Control](https://s1-www.textcontrol.com/assets/dist/blog/2023/04/27/a/assets/template9.webp "Healthcare Report with TX Text Control")

In the template, the merge block is a table row containing the measurement merge fields. The first row of the table is set to repeat on each page.

![Healthcare Report with TX Text Control](https://s1-www.textcontrol.com/assets/dist/blog/2023/04/27/a/assets/template10.webp "Healthcare Report with TX Text Control")

In the two columns listing the systolic and diastolic pressure values, an additional *IF* field is used to visualize a value that is higher than the normal, expected value. This field is created using the same technique as the thumbs up fields in the introductory section of the report. If the value is greater than 120, a red triangle is conditionally rendered.

![Healthcare Report with TX Text Control](https://s1-www.textcontrol.com/assets/dist/blog/2023/04/27/a/assets/template11.webp "Healthcare Report with TX Text Control")

In the resulting document, the red triangles are rendered in the repeating merge block.

![Healthcare Report with TX Text Control](https://s1-www.textcontrol.com/assets/dist/blog/2023/04/27/a/assets/template12.webp "Healthcare Report with TX Text Control")

#### Download Template and Data

For your own testing, you can download the template and the sample XML data. Load the template into the provided *TX Text Control Words* sample application, load the XML file as the data source by clicking *Load XML File* from the *Select Data Source* button in the *Reporting* ribbon tab. Click on *Merge and Export* to view the results.

Template and data: [blood\_data.zip](https://s1-www.textcontrol.com/assets/dist/blog/2023/04/27/a/assets/blood_data.zip)

---

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

- [When to Generate Documents Server-Side Instead of Client-Side: A Focus on Data Security](https://www.textcontrol.com/blog/2024/10/04/when-to-generate-documents-server-side-instead-of-client-side-a-focus-on-data-security/llms.txt)
- [Designing the Perfect Contract Template for MailMerge in C#](https://www.textcontrol.com/blog/2024/09/26/designing-the-perfect-contract-template-for-mailmerge-in-csharp/llms.txt)
- [Getting Started Video Tutorial: How to use the MailMerge and ServerTextControl Classes in ASP.NET Core C#](https://www.textcontrol.com/blog/2024/08/05/getting-started-video-tutorial-how-to-use-the-mailmerge-and-servertextcontrol-classes-in-asp-net-core-c/llms.txt)
- [Getting Started Videos: New Text Control YouTube Channel](https://www.textcontrol.com/blog/2024/08/02/getting-started-videos-new-text-control-youtube-channel/llms.txt)
- [Creating Valid XRechnung / ZUGFeRD Invoices with ASP.NET Core C#](https://www.textcontrol.com/blog/2023/12/28/creating-valid-xrechnung-zugferd-invoices-with-asp-net-core-csharp/llms.txt)
- [New MailMerge Live Demo: Form Field Mail Merge](https://www.textcontrol.com/blog/2022/12/21/new-mailmerge-sample-form-field-mail-merge/llms.txt)
