We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

multiple page DataTable

Thread ID:

Created:

Updated:

Platform:

Replies:

44040 May 11,2006 02:09 PM UTC May 11,2006 09:00 PM UTC WinForms 3
loading
Tags: PDF
Jesse Marek
Asked On May 11, 2006 02:09 PM UTC

If I have a really big data table that I want to convert to PDF, is there a simple way to have it span multiple pages on the PDF document? If there''s a good answer to that question, is there an easy way to have it automatically create the number of pages I need based on the number of rows, height of rows, layout and size of the page, etc...?

Ajish [Syncfusion]
Replied On May 11, 2006 03:41 PM UTC

Hi Jesse,

Thank you for your interest in Essential PDF. It is very simple to insert a data table into a pdf document that span for multiple pages using Essential PDF. The ITable interface is needed for importing a table from a database to a PDF document. The method ConfigureTable and Publish method is called for importing and publishing the table into the pdf page. PageBreakBehavior property is used to make table span for multiple columns.

Steps in inserting ADO.Net DataTable:

1) Creating a table // Creating a table. ITable table = pdfDoc.CreateTable(); 2) Get the Datatable to be inserted from the database // Getting the table to a dataset. DataSet dataSet11 = new DataSet(); // Getting Xml file. dataSet11.ReadXml("customers.xml"); dsNorthWind =dataSet11; 3) Set the PageBreakBehaviour property of the created table to span in multiple pages. //To make the Table span over multiple pages without getting cut. table.PageBreakBehavior = AutoBreakBehavior.FullBreak; 4) Assigning dataset to the created table // Assigning the dataset to the created table. table.DataMember = dsNorthWind.Tables[0].TableName; table.DataSource = dsNorthWind; // Configuring the table. table.ConfigureTable( dsNorthWind.Tables[0] ); 5) Publish table. // Publish the table. table.Publish( new PointF( 0, 0 ),pdfDoc.Pages[0]);

Here is sample for your reference: NorthWindReport.zip

Please take a look at the sample and let me know if you need any further assistance.

Thanks, Ajish.

Jesse Marek
Replied On May 11, 2006 04:41 PM UTC

Thanks a lot. Is there also some way I can find the page and location that the table ended so that I can start a new table at that location? >Hi Jesse, > >

Thank you for your interest in Essential PDF. It is very simple to insert a data table into a pdf document that span for multiple pages using Essential PDF. The ITable interface is needed for importing a table from a database to a PDF document. The method ConfigureTable and Publish method is called for importing and publishing the table into the pdf page. PageBreakBehavior property is used to make table span for multiple columns. >

>Steps in inserting ADO.Net DataTable: >

>1) Creating a table > > >// Creating a table. >ITable table = pdfDoc.CreateTable(); > > >2) Get the Datatable to be inserted from the database > > >// Getting the table to a dataset. >DataSet dataSet11 = new DataSet(); > > >// Getting Xml file. >dataSet11.ReadXml("customers.xml"); >dsNorthWind =dataSet11; > > >3) Set the PageBreakBehaviour property of the created table to span in multiple pages. > > >//To make the Table span over multiple pages without getting cut. >table.PageBreakBehavior = AutoBreakBehavior.FullBreak; > > >4) Assigning dataset to the created table > > >// Assigning the dataset to the created table. >table.DataMember = dsNorthWind.Tables[0].TableName; >table.DataSource = dsNorthWind; > >// Configuring the table. >table.ConfigureTable( dsNorthWind.Tables[0] ); > > >5) Publish table. > > >// Publish the table. >table.Publish( new PointF( 0, 0 ),pdfDoc.Pages[0]); > >

> >Here is sample for your reference: NorthWindReport.zip > > >

Please take a look at the sample and let me know if you need any further assistance.

> > >Thanks, >Ajish. >

Administrator [Syncfusion]
Replied On May 11, 2006 09:00 PM UTC

Hi Jesse, Please refer to this sample ITable.Publish gives the table size InsertTables.zip Best regards, Stephen.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;