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.
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 example reads the shop data described in The Business Layer.
import json
from groupdocs.assembly import DataSourceInfo, DocumentAssembler
with open("customer.json", encoding="utf-8") as f:
customer = json.load(f)
assembler = DocumentAssembler()
assembler.assemble_document("single-row.txt", "single-row-report.txt", DataSourceInfo(customer, "customer"))
The following sample file is used in this example: single-row.txt
The following sample file is used in this example: customer.json
Name: Quayside Bistro
Age: +1 555 0142 811
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.