Numbered List in HTML Document

Note
In this article, we will use GroupDocs.Assembly to generate a Numbered List report in HTML Document format.
Note
The code uses some of the objects defined in The Business Layer.
Note
This feature is supported by version 17.03 or greater.

Numbered List in HTML Document

Reporting Requirement

As a report developer, you are required to describe the services you are providing with the following key requirements:

  • The report must show the products in numbered list.
  • The report must be generated in the HTML Document.

Adding Syntax to be evaluated by GroupDocs.Assembly Engine

We provide support for the following products:
<ol>
&lt;&lt;foreach [in products]&gt;&gt;
<li>&lt;&lt;[ProductName]&gt;&gt;</li>
&lt;&lt;/foreach&gt;&gt;
</ol>
Tip
For detailed technical information about syntax, expressions and report generation by the engine, please visit: Working with GroupDocs.Assembly Engine.

Download Numbered List Template

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

Generating The Report

// For complete examples and data files, please go to https://github.com/groupdocs-assembly/GroupDocs.Assembly-for-.NET
//Setting up source html template
const String strDocumentTemplate = "HTML Templates/Numbered List.html";
//Setting up destination html report
const String strDocumentReport = "HTML Reports/Numbered List Report.html";
try
{
//Instantiate DocumentAssembler class
DocumentAssembler assembler = new DocumentAssembler();
//Call AssembleDocument to generate Numbered List Report in html format
assembler.AssembleDocument(CommonUtilities.GetSourceDocument(strDocumentTemplate),
CommonUtilities.SetDestinationDocument(strDocumentReport),
new DataSourceInfo(DataLayer.GetProductsData(), "products"));
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
Close
Loading

Analyzing your prompt, please hold on...

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