GroupDocsGists
10/24/2017 - 1:48 PM

GenerateInTableListWithHighlightedRowsFromDatabaseinDocumentProcessingFormat.cs

// For complete examples and data files, please go to https://github.com/groupdocsassembly/GroupDocs_Assembly_NET
//Setting up source document template
const String strDocumentTemplate = "Word Templates/In-Table List with Highlighted Rows_DB.docx";
//Setting up destination document report 
const String strDocumentReport = "Word Reports/In-Table List with Highlighted Rows_DB Report.docx";
try
{
    //Instantiate DocumentAssembler class
    DocumentAssembler assembler = new DocumentAssembler();
    //Call AssembleDocument to generate In-Table List with Highlighted Rows Report in document format
    assembler.AssembleDocument(CommonUtilities.GetSourceDocument(strDocumentTemplate), CommonUtilities.SetDestinationDocument(strDocumentReport), DataLayer.GetOrdersDataDB(), "orders");
}
catch (Exception ex)
{
    Console.WriteLine(ex.Message);
}