Single Row in Text Document

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

Single Row in Text Document

Note
This feature is supported by version 17.03 or greater.

Reporting Requirement

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

  • It must show Name and Contact Number of the customer
  • Report must be generated in the Text Document

Adding Syntax to be evaluated by GroupDocs.Assembly Engine

Name:	<<[customer.CustomerName]>>
Contact Number:	<<[customer.CustomerContactNumber]>>
Tip
For detailed technical information about syntax, expressions and report generation by the engine, please visit: Working with GroupDocs.Assembly Engine.

Download Single Row Image Template

Please download the single row image document we created in this article:

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 text format template
const String strTextTemplate = "Text Templates/Single Row.txt";
//Setting up destination text format report
const String strDocumentReport = "Text Reports/Single Row Report.txt";
try
{
//Instantiate DocumentAssembler class
DocumentAssembler assembler = new DocumentAssembler();
//Call AssembleDocument to generate Single Row Report in text format format
assembler.AssembleDocument(CommonUtilities.GetSourceDocument(strTextTemplate),
CommonUtilities.SetDestinationDocument(strDocumentReport),
new DataSourceInfo(DataLayer.GetCustomerData(), "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.