Hi
I have a simple table with mail merge fields and a datatable with some records.
when use method below to fill the document
Document doc = new Document(@“C:\MailMerge.ExecuteWithRegions.docx”);
DataTable dt = new DataTable(“OrderDetails”);
dt.Columns.Add(“ProductID”);
dt.Columns.Add(“ProductName”);
dt.Columns.Add(“Quantity”);
dt.Columns.Add(“UnitPrice”);
dt.Columns.Add(“Discount”);
dt.Columns.Add(“ExtendedPrice”);
//Repeat these lines to have enough records to fit in two pages in final result document
dt.Rows.Add(1, “Pitza”, 2, 100, 5, 0);
dt.Rows.Add(1, “Pitza”, 2, 100, 5, 0);
dt.Rows.Add(1, “Pitza”, 2, 100, 5, 0);
dt.Rows.Add(1, “Pitza”, 2, 100, 5, 0);
dt.Rows.Add(1, “Pitza”, 2, 100, 5, 0);
dt.Rows.Add(1, “Pitza”, 2, 100, 5, 0);
dt.Rows.Add(1, “Pitza”, 2, 100, 5, 0);
.
.
.
doc.MailMerge.ExecuteWithRegions(dt); //dt is my data table
the result document has two pages but just the first page has Table Headers,
and records which are in the second page has no Table Header.
Can anyone tell me how to change document template/my c# app to have table headers in all pages of result document ?