Quantcast
Channel: Aspose.Pdf Product Family
Viewing all articles
Browse latest Browse all 3131

Multiple Tables

$
0
0
Hello,

I am using Aspose PDF for .NET to attempt to render some reports.

I am trying to render two tables on a single PDF Document using the table object.  Both tables are quite long and therefore go into multiple pages. 

I am currently setting up the first table populating it with data and then adding it to the page.  Then I am taking a new page, setting up a new table then adding it to the next page

// Add the first table
Page page = doc.Pages.Add();    
Table table;
SetupTable(out table);
Row newRow;
foreach(DataRow dr in dt.Rows) 
{
newRow = table.Rows.Add();
}
 page.Paragraphs.Add(table);

page = doc.Pages.Add();    
SetupTable(out table);
foreach(DataRow dr in dt2.Rows) 
{
newRow = table.Rows.Add();
}
 page.Paragraphs.Add(table);


The result of all this is the first part of table 1 appears in page 1, then on page 2 I get the first part of table 2.  Then in the next pages I get the remaining parts of table 1 and table 2.

Any help would be most welcome.

Thanks


Viewing all articles
Browse latest Browse all 3131

Trending Articles