Single Row in Text Document
Leave feedback
NoteIn this article, we will use GroupDocs.Assembly to generate a Single Row report in Text Document format.
NoteThis feature is supported by version 17.03 or greater.
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
Name: <<[customer.CustomerName]>>
Contact Number: <<[customer.CustomerContactNumber]>>
TipFor detailed technical information about syntax, expressions and report generation by the engine, please visit: Working with GroupDocs.Assembly Engine.
Please download the single row image document we created in this article:
NoteThe 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); | |
} |
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.