Common List in Text Document

Note
In this article, we will use GroupDocs.Assembly to generate a Common List report in Text Document format.
Note
The example reads the shop data described in The Business Layer.

Common List in Text Document

Reporting Requirement

As a report developer, you are required to share the following key requirements:

  • The report must be generated in the Text Document format

Adding Syntax to be evaluated by GroupDocs.Assembly Engine

<<foreach [in customers]>><<[CustomerName]>>
<</foreach>>

Download Common List Template

Please download the sample Common List document we created in this article:

Generating The Report

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

Download full output

Close
Loading

Analyzing your prompt, please hold on...

An error occurred while retrieving the results. Please refresh the page and try again.