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.

Image merging in Text Control reports

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.

  1. In TX Text Control Words, click on Load Sample Database from the Select Data Source drop-down button in the Mailings ribbon tab.

    Image merging in Text Control reports
  2. Find the Image drop-down button in the Insert ribbon tab and choose Image Placeholder.

    Image merging in Text Control reports
  3. Right-click the inserted image placeholder Sales_SalesOrderDetail from the Select Object Data Source context menu item.

    Image merging in Text Control reports
  4. 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.

    Image merging in Text Control reports
  5. In the Mailings ribbon tab, choose Preview Merge Fields to start the merge process.

    Image merging in Text Control reports

Using this easy-to-use data connection of images, you can create product lists, inventory listings or similar reports effortlessly.