Single Row Image in Email Document

Note
In this article, we will use GroupDocs.Assembly to generate a Single Row Image report in Email Document format.

Single Row Image in Email Document

Note
This feature is supported by version 17.8.0 or greater

Reporting Requirement

As a report developer, you are required to represent information of first single manager with the following key requirements:

  • Report must be in .eml or .msg format
  • It must add email recipient, css and subject of the email
  • Report must show image of the manager
  • It must show Name and contact number of customer

Adding Syntax to be evaluated by GroupDocs.Assembly Engine

Name:	<<[customer.CustomerName]>>
Contact Number:	<<[customer.CustomerContactNumber]>>

Download Single Row Image Template

Please download the sample template we created in this article:

Tip
For detailed technical information about syntax,expressions and report generation by the engine, please visit: Working with GroupDocs.Assembly Engine.

Generating The Report

Note
The code uses some of the objects defined in: The Business Layer.
//For complete examples and data files, please go to https://github.com/groupdocs-assembly/GroupDocs.Assembly-for-.NET
//Setting up source email format template
const String strEmailTemplate = "Email Templates/Single Row.msg";
//Setting up destination email format report
const String strEmailReport = "Email Reports/Single Row Report.msg";
try
{
//Instantiate DocumentAssembler class
DocumentAssembler assembler = new DocumentAssembler();
//Call AssembleDocument to generate Single Row Report in email format
assembler.AssembleDocument(CommonUtilities.GetSourceDocument(strEmailTemplate), CommonUtilities.SetDestinationDocument(strEmailReport), DataLayer.EmailDataSourceObject(strEmailTemplate, DataLayer.GetCustomerData()), DataLayer.EmailDataSourceName(".msg", "customer"));
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}

Close
Loading

Analyzing your prompt, please hold on...

An error occurred while retrieving the results. Please refresh the page and try again.