Hi, I have been trying to use Syncfusion.DocIO.Net.Core v31.2.2 to process a Word document containing two nested merge tables (initially on an Azure function project, but have moved to a console app for testing), however every time it runs it generates a file with no data. I have tried similar using ExecuteGroups() with a single table and this seems to work, however when using ExecuteNestedGroups() it silently fails. A snippet of my code is below:
var ds = new DataSet();
var invoice = new DataTable("Invoice");
invoice.Columns.Add("InvoiceID", typeof(int));
invoice.Columns.Add("InvoiceDate", typeof(string));
invoice.Rows.Add(1, "2025-10-15");
ds.Tables.Add(invoice);
var sundries = new DataTable("Sundries");
sundries.Columns.Add("InvoiceID", typeof(int));
sundries.Columns.Add("Name", typeof(string));
sundries.Rows.Add(1, "Widget");
sundries.Rows.Add(1, "Cable");
ds.Tables.Add(sundries);
ds.Relations.Add("Invoice_Sundries",
invoice.Columns["InvoiceID"], sundries.Columns["InvoiceID"], false);
using var doc = new WordDocument("MailMergeTemplates/NestedMergeTest.docx", Syncfusion.DocIO.FormatType.Docx);
var roots = new ArrayList { new DictionaryEntry("Invoice", "Invoice") };
doc.MailMerge.ExecuteNestedGroup(ds, roots);
doc.Save("result.docx");
I have also attached my Word document template, I appreciate any help.
Thanks
Attachment:
NestedMergeTest_18c30447.docx