In-Paragraph List in Email Document

Note
In this article, we will use GroupDocs.Assembly to generate a In-Paragraph List report in Email Document format.

In-Paragraph List in Email Document

Reporting Requirement

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

  • Report must be in .eml or .msg format.
  • It must add email recipient, css and subject of the email.
  • A descriptive or informative line like “We provide support for the following products:”.
  • Show all the products along with the above sentence.

Adding Syntax to be evaluated by GroupDocs.Assembly Engine

We provide support for the following products:
<<foreach [in products]>><<[IndexOf() != 0 ? ", " : ""]>>
<<[ProductName]>>
<</foreach>>
Tip
For detailed technical information about syntax,expressions and report generation by the engine, please visit: Working with GroupDocs.Assembly Engine.

Download In-Paragraph List Template

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

Generating The Report

Note
The example reads the shop data described in The Business Layer.
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("in-paragraph-list.msg", "in-paragraph-list-report.msg", [
    DataSourceInfo(products, "products"),
    DataSourceInfo("Harbor Lane Provisions <orders@harborlane.example>", "sender"),
    DataSourceInfo(["Quayside Bistro <orders@quaysidebistro.example>", "jonas.weber@harborlane.example"], "recipients"),
    DataSourceInfo("amara.osei@harborlane.example", "cc"),
    DataSourceInfo("In paragraph list", "subject"),
])

The following sample file is used in this example: in-paragraph-list.msg

The following sample file is used in this example: products.json

Binary file (MSG, 32 KB)

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.