Image Merging in Text Control Reports
Images can be merged in the same way like merge fields in a reporting template. Placeholders are added at design-time and merged with data from files, databases or memory. 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. These options cover most typical image representations in databases. Merged images are scaled up or…

Images can be merged in the same way like merge fields in a reporting template. Placeholders are added at design-time and merged with data from files, databases or memory.

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. These options cover most typical image representations in databases. Merged images are scaled up or down to match the width of the placeholder image in the template.
The following steps show how to insert such placeholders and merge them with images from the shipped sample database.
-
In TX Text Control Words, click on Load Sample Database from the Select Data Source drop-down button in the Mailings ribbon tab.
-
Find the Image drop-down button in the Insert ribbon tab and choose Image Placeholder.
-
Right-click the inserted image placeholder Sales_SalesOrderDetail from the Select Object Data Source context menu item.
-
In the opened dialog box, expand the data table relation nodes and select LargePhoto from this path:
Sales_SalesOrderDetail -> Production_Product -> Production_ProductProductPhoto -> Production_ProductPhoto
Confirm with Insert Field.
-
In the Mailings ribbon tab, choose Preview Merge Fields to start the merge process.
Using this easy-to-use data connection of images, you can create product lists, inventory listings or similar reports effortlessly.
Reporting
The Text Control Reporting Framework combines powerful reporting features with an easy-to-use, MS Word compatible word processor. Users can create documents and templates using ordinary Microsoft Word skills. The Reporting Framework is included in all .NET based TX Text Control products including ASP.NET, Windows Forms and WPF.
Related Posts
Creating Your First ASP.NET Reporting Application
This tutorial shows how to use the MailMerge component in an ASP.NET Web application to merge a template with data to create an Adobe PDF document.
New Online Sample: Build your First Report
We published a new online demo that shows how to create a report including preparing data, creating a template to merging them together.
ReportingDocumentationReportingCloud
Create your First Document with ReportingCloud
As part of our new ReportingCloud documentation, we published a guided tutorial that shows how to create a document without programming.
MailMerge: Starting Each Merge Block on a New Page
A merge block is repeated based on the number of matching data rows in the hierarchical data object. The complete merge block is cloned and inserted under the original location in the template.…
Using MailMerge with JSON Data
In the last article, we explained how to create an ASP.NET Web API to merge templates with JSON data in the payload body of an HTTP request. The focus of this article was on the Web API and…