Working with Lazy And Recursive Access of Data

Note
The code uses some of the objects defined in The Business Layer.

Purpose

At some point, you may want to or trying to use IDataRecord and IDataReader recursively in your application using GroupDocs.Assembly for .NET. But these Interfaces cannot serve the purpose. However, it is quite possible to accomplish the same goal using custom types. See IDataReader and IDataRecords Implementors here.

Creating Template

Download Template

Get template from here.

Generating The Report

// For complete examples and data files, please go to https://github.com/groupdocs-assembly/GroupDocs.Assembly-for-.NET
//Setting up source open document template
const String strDocumentTemplate = "Word Templates/Lazy And Recursive.docx";
//Setting up destination open document report
const String strDocumentReport = "Word Reports/Lazy And Recursive Report.docx";
try
{
//Instantiate DynamicEntity class
DynamicEntity dEntity = new DynamicEntity(Guid.NewGuid());
//Instantiate DocumentAssembler class
DocumentAssembler assembler = new DocumentAssembler();
//Call AssembleDocument to generate Single Row Report in open document format
assembler.AssembleDocument(CommonUtilities.GetSourceDocument(strDocumentTemplate),
CommonUtilities.SetDestinationDocument(strDocumentReport),
new DataSourceInfo(dEntity, "root"));
}
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.