Common List in Text Document
Leave feedback
NoteIn this article, we will use GroupDocs.Assembly to generate a Common List report in Text Document format.
NoteThe example reads the shop data described in The Business Layer.
As a report developer, you are required to share the following key requirements:
- The report must be generated in the Text Document format
<<foreach [in customers]>><<[CustomerName]>>
<</foreach>>
Please download the sample Common List document we created in this article:
import json
from groupdocs.assembly import DataSourceInfo, DocumentAssembler
with open("customers.json", encoding="utf-8") as f:
customers = json.load(f)
assembler = DocumentAssembler()
assembler.assemble_document("common-list.txt", "common-list-report.txt", DataSourceInfo(customers, "customers"))
The following sample file is used in this example: common-list.txt
The following sample file is used in this example: customers.json
Quayside Bistro
Lantern Street Café
Saltmarsh Deli
Pier Nine Kitchen
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.