Single Row in Text Document

Note
In this article, we will use GroupDocs.Assembly to generate a Single Row report in Text Document format.

Single Row in Text Document

Reporting Requirement

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

Adding Syntax to be evaluated by GroupDocs.Assembly Engine

Name:	<<[customer.CustomerName]>>
Contact Number:	<<[customer.CustomerContactNumber]>>
Tip
For detailed technical information about syntax, expressions and report generation by the engine, please visit: Working with GroupDocs.Assembly Engine.

Download Single Row Image Template

Please download the single row image 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("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

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.