# Demo Template: Historical Stock Overview Report

> A stock overview report template demonstrates TX Text Control Reporting features: formatted date fields, image placeholders for company logos, trend line charts, and merge blocks with alternating row colors. Yahoo Finance API data is merged through typed business objects in one call.

- **Author:** Bjoern Meyer
- **Published:** 2014-02-18
- **Modified:** 2026-07-17
- **Description:** A stock overview report template demonstrates TX Text Control Reporting features: formatted date fields, image placeholders for company logos, trend line charts, and merge blocks with alternating row colors. Yahoo Finance API data is merged through typed business objects in one call.
- **5 min read** (853 words)
- **Tags:**
  - Mail Merge
  - Reporting
- **Web URL:** https://www.textcontrol.com/blog/2014/02/18/demo-template-historical-stock-overview-report/
- **LLMs URL:** https://www.textcontrol.com/blog/2014/02/18/demo-template-historical-stock-overview-report/llms.txt
- **LLMs-Full URL:** https://www.textcontrol.com/blog/2014/02/18/demo-template-historical-stock-overview-report/llms-full.txt

---

We just finished a new set of sample templates and demo applications for upcoming conferences to show the power of Text Control's [**Flow Type Layout Reporting**](https://www.textcontrol.com/technology/reporting/).

The [Yahoo! Finance API](http://code.google.com/p/yahoo-finance-managed/wiki/CSVAPI) is a service that Yahoo! provides to download financial data in various formats such as CSV, YQL (an expressive SQL-like language) or RSS. It is a perfect tool to get real-time data for demo reports.

We created a beautiful report template that shows stock information, company logo, current prices, a trend line chart and a list of history prices realized as merge blocks with alternating row styles. The ready-merged report for the stock ticker name 'MSFT' is shown below:

[![Historical Stock Overview Report](https://s1-www.textcontrol.com/assets/dist/blog/2014/02/18/a/assets/stock_report_zoom.webp "Historical Stock Overview Report")](https://s1-www.textcontrol.com/assets/dist/blog/2014/02/18/a/assets/stock_report_zoom.webp)

The following screenshot shows the TX Text Control template with some of the various reporting elements for the above report:

[![Historical Stock Overview Report](https://s1-www.textcontrol.com/assets/dist/blog/2014/02/18/a/assets/report_template_zoom.webp "Historical Stock Overview Report")](https://s1-www.textcontrol.com/assets/dist/blog/2014/02/18/a/assets/report_template_zoom.webp)

The data source for this report is a business object with the following design:

![Business object](https://s1-www.textcontrol.com/assets/dist/blog/2014/02/18/a/assets/report_data.webp "Business object")To merge this template, only one code line is required that passes the object of type **StockReport** to the MailMerge component:

```
mailMerge1.MergeObjects(reports);
```

Formatted Date Fields
---------------------

Date fields can have a specific format that can be defined in the template designer:

![Date field](https://s1-www.textcontrol.com/assets/dist/blog/2014/02/18/a/assets/date_field.webp "Date field")The input of this field is of type *DateTime* and will be rendered in the following format: *MM/dd/yyy*. All typical string format switches are supported and can be directly adjusted in the dialog.

Image Placeholders
------------------

Images and barcodes can be merged in the same way like merge fields in a reporting template. An image or barcode placeholder is added at design-time to the template and merged with data from files, databases or memory.

![Image Placeholders](https://s1-www.textcontrol.com/assets/dist/blog/2014/02/18/a/assets/image_logo.webp "Image Placeholders")In this demo report, the image data is downloaded from a Web Service, converted into a *System.Drawing.Image* and directly merged as part of the business object. Using Text Control Reporting, you simply pass the business object to *MailMerge* and everything alse is done automatically. An image object can be added to the template with a given name. The data column must contain either the binary image data as a byte array, an object of type System.Drawing.Image, a file name, a hex or Base64 encoded string.

Trend Line Charts
-----------------

Powerful data visualization in a report or any other documents is essential to get the "big picture". Charts indicate trends and can be used to attractively visualize large volumes of data.

In this demo, all daily stock prices are added to a line chart to indicate a trend. The size and style of charts are added at design-time and merged dynamically.

![Trend Line Charts](https://s1-www.textcontrol.com/assets/dist/blog/2014/02/18/a/assets/chart_trend.webp "Trend Line Charts")Merge Blocks
------------

Creating powerful hierarchical reports is the strength of TX Text Control. Nested repeating blocks with master-detail relationship views can be easily inserted. It doesn't matter what's repeated in the block: A table row, paragraphs, images or text frames.

![Merge Blocks](https://s1-www.textcontrol.com/assets/dist/blog/2014/02/18/a/assets/merge_block.webp "Merge Blocks")Additionally, this merge block consists of a table header that is repeated on a new page and a new column. The table for the merge block is in a column layout which results in a two column table representation.

Alternating Row Colors
----------------------

It is important to adjust the display of your tabular data in order to improve the readability. Reading large sets of numbers in long tables can be hard and there are easy ways to improve that. A smart way to accomplish this task are alternating row colors.

![Merge Blocks](https://s1-www.textcontrol.com/assets/dist/blog/2014/02/18/a/assets/alternate_rows.webp "Merge Blocks")The merge block range includes two table rows that contain identical merge fields. The background color of the second table row is different. In fact, you could also have different merge fields in those rows. At the end of the first row, a NEXT field has been added which switches to the next data record in the middle of a page.

![Live Reporting Demo](https://s1-www.textcontrol.com/assets/dist/blog/2014/02/18/a/assets/live_sample.webp "Live Reporting Demo")Live Demo - Try it on your own!
-------------------------------

We published this sample application and the Text Control Reporting template to our demo server.

Let's scrunch the numbers!

[Start Demo ](http://labs.textcontrol.com/ "Start Demo")

---

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

- [MailMerge Class Settings Explained](https://www.textcontrol.com/blog/2019/12/05/mailmerge-settings-explained/llms.txt)
- [Merge Excel Documents into MailMerge Templates using IncludeText Fields](https://www.textcontrol.com/blog/2019/08/13/merge-excel-documents-into-mailmerge-templates/llms.txt)
- [MailMerge: Conditional Table Cell Colors using Filter Instructions](https://www.textcontrol.com/blog/2019/06/06/mailmerge-conditional-table-cell-colors-using-filter-instructions/llms.txt)
- [MailMerge: Using Filters to Remove Unwanted Rows](https://www.textcontrol.com/blog/2019/06/04/mailmerge-using-filters-to-remove-unwanted-rows/llms.txt)
- [MailMerge: Conditional Rendering of Merge Blocks](https://www.textcontrol.com/blog/2018/11/28/mailmerge-conditional-rendering-of-merge-blocks/llms.txt)
- [DataSourceManager: Using the Ready-to-Use Reporting Dialog Boxes](https://www.textcontrol.com/blog/2018/11/27/datasourcemanager-using-the-ready-to-use-reporting-dialog-boxes/llms.txt)
- [Merge Blocks in X16: Filtering, Sorting and Conditional Rendering](https://www.textcontrol.com/blog/2018/11/22/merge-blocks-in-x16-filtering-sorting-and-conditional-rendering/llms.txt)
- [Different Ways to Create Documents using Text Control Products](https://www.textcontrol.com/blog/2017/10/17/ways-to-create-documents-using-text-control-products/llms.txt)
- [ReportingCloud: Uploading Templates Vs. Sending Templates Inside MergeBody](https://www.textcontrol.com/blog/2017/08/02/reportingcloud-uploading-templates-vs-sending-templates-inside-mergebody/llms.txt)
- [MailMerge: Table Headers and Repeating Blocks](https://www.textcontrol.com/blog/2017/08/01/mailmerge-table-headers-and-repeating-blocks/llms.txt)
- [Text Control Provides a Complete Reporting Tool Set to Fulfill Document Work-flow Requirements](https://www.textcontrol.com/blog/2017/05/09/text-control-provides-a-complete-reporting-tool-set-to-fulfill-document-work-flow-requirements/llms.txt)
- [ReportingCloud: Conditional Text Blocks Based on Merge Blocks](https://www.textcontrol.com/blog/2016/11/02/reportingcloud-conditional-text-blocks-based-on-merge-blocks/llms.txt)
- [MailMerge Improvements in X14: Event Arguments and JSON Data Sources](https://www.textcontrol.com/blog/2016/11/01/mailmerge-improvements-in-x14-event-arguments-and-json-data-sources/llms.txt)
- [Web API Test Sandbox Released on ReportingCloud Portal](https://www.textcontrol.com/blog/2016/10/07/web-api-test-sandbox-released-on-reportingcloud-portal/llms.txt)
- [ReportingCloud: New Test Parameter for Document Quota Related Endpoints](https://www.textcontrol.com/blog/2016/10/06/reportingcloud-new-test-parameter-for-document-quota-related-endpoints/llms.txt)
- [ReportingCloud: The MergeData JSON Object Format Explained](https://www.textcontrol.com/blog/2016/10/04/reportingcloud-the-mergedata-json-object-format-explained/llms.txt)
- [Creating Dynamic HTML Forms Using ReportingCloud](https://www.textcontrol.com/blog/2016/09/28/creating-dynamic-html-forms-using-reportingcloud/llms.txt)
- [MailMerge: Starting Each Merge Block on a New Page](https://www.textcontrol.com/blog/2016/09/09/mailmerge-starting-each-merge-block-on-a-new-page/llms.txt)
- [Creating Reports from QuickBooks or Salesforce Data Sources Using ReportingCloud and CData Cloud Drivers](https://www.textcontrol.com/blog/2016/06/30/creating-reports-from-quickbooks-or-salesforce-data-sources-using-reportingcloud-and-cdata-cloud-drivers/llms.txt)
- [MailMerge: Merging Fields from Child Tables or Related Objects](https://www.textcontrol.com/blog/2016/06/28/mailmerge-merging-fields-from-child-tables-or-related-objects/llms.txt)
- [Preview: JSON Support in MailMerge Version X14 (24.0)](https://www.textcontrol.com/blog/2016/05/18/preview-json-support-in-mailmerge-version-x14-240/llms.txt)
- [MailMerge: The Append Parameter of the Merge Method Explained](https://www.textcontrol.com/blog/2016/04/05/mailmerge-the-append-parameter-of-the-merge-method-explained/llms.txt)
- [MVC: Adding an Electronic Signature to Documents in Web.TextControl](https://www.textcontrol.com/blog/2016/02/18/mvc-adding-an-electronic-signature-to-documents-in-webtextcontrol/llms.txt)
- [MailMerge: Merge, MergeObject and MergeObjects - When to Use What?](https://www.textcontrol.com/blog/2016/02/16/mailmerge-merge-mergeobject-and-mergeobjects-when-to-use-what/llms.txt)
- [MailMerge: Removing Empty Blocks](https://www.textcontrol.com/blog/2016/02/15/mailmerge-removing-empty-blocks/llms.txt)
