Adding NEXT Field into Template Syntax
Leave feedback
On this page
The example reads the shop data described in The Business Layer.
Template Syntax
We provide support for the following products:
. <<foreach [in products]>><<next>><<[ProductName]>>
<</foreach>>
- Set up the source document template path
- Set up destination report path
- Instantiate DocumentAssembler class
- Generate report
Get the template from here.
import json
from groupdocs.assembly import DataSourceInfo, DocumentAssembler
with open("products.json", encoding="utf-8") as f:
products = json.load(f)
assembler = DocumentAssembler()
assembler.assemble_document("next-field.docx", "next-field-report.docx", DataSourceInfo(products, "product"))
The following sample file is used in this example: next-field.docx
The following sample file is used in this example: products.json
Binary file (DOCX, 11 KB)
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.