Hello,
I am trying to work with the Mail Merge with regions. but it seems I am doing something wrong.
Below method is simply building the document as per the template provided, see the attached student.doc file
public void BuildReport(DataTable table)
{
Document doc = new Document("student.doc");
table.TableName = "Students";
doc.MailMerge.ExecuteWithRegions(table);
doc.Save("Out.doc");
}
My datatable is having 99 rows which I am passing to this method. But dont know wherre I am mistaking.
Select StudentName from Student where StudentID < 1000
This query above is brining 99 records but using the above mentioned method it is not writing into the word document.
Thanks and best regards
Austinn.