Hello together,
I’m using a PDF report from the “Infragistics.Documents.Reports.Report” namespace.The main objects are:
private Report m_Report = null; private ISection m_ISection = null; ITable hITable = m_ISection.AddTable();
For a new customer demand I should implement a simple “next page” option in this report. But I didn’t find any hint how a “next page” command inside a table can be done at all. I need the programmable “next page” command at the position of the red arrow.Is there a simple way for doing this?
Thank you very much for any helping.
Best regardsFrank
Hi Frank,
I took a quick look at the table and related objects and I noticed that there is an AddPageBreak method on ITableCell. I tried this out with some quick sample code and it seems to work fine.
Report report = new Report(); ISection section = report.AddSection(); ITable table = section.AddTable(); for (int i = 0; i < 20; i++) { ITableRow row = table.AddRow(); for (int j = 0; j < 3; j++) { ITableCell cell = row.AddCell(); IText text = cell.AddText(); text.AddContent(string.Format("row {0}, cell {1}", i, j)); if (i == 17) cell.AddPageBreak(); } } string fileName = Path.Combine(Path.GetDirectoryName(Application.ExecutablePath), "x.pdf"); report.Publish(fileName, FileFormat.PDF); Process.Start(fileName);
Hi Mike,
Your sample is working perfectly also in my case.Thank you so much for your worthful help.