I am trying to create a multi-section PDF report and am getting this error when doing the second .InsertTable:
System.ArgumentException: The document element is associated with another parent.
Something like this:
var pdfDocument = new RadFixedDocument()
{
DocumentInfo =
{
Title = packageTitle,
Author = packageRunBy
}
};
pdfDocument.Destinations.AddPageHorizontalFit();
var pdfEditor = new RadFixedDocumentEditor(pdfDocument);
foreach (var report in reports)
{
if (pdfDocument.Pages.Count > 0) pdfEditor.InsertSectionBreak();
var reportTable = new Table();
// Build the Table
pdfEditor.InsertTable(reportTable); // Errors here on the second time around the loop
}