we are using Infragistics.Documents.Reports and we observed that while generating report PDF - our contents are getting truncated if those are more than 2 pages in the grid. It shows total 3 page report where 3rd page displays with footer information and 1st page displays header part and detail report part and 2nd page also displays detail part. Data are coming properly as if i decrease padding then it shows me some of the truncated data which could fit into 2nd page but after 2nd page - it won't show any remaining data of the detail.
Any way to identify or recalculate page generation logic of the content if its now generating enough pages then can we generate explicitly but for that we need to know how many pages would be required to show this content and build up that logic as well..
any solution is recommended.
Hello Mosam,
Thank you for your post.
Ultragrid dosent have page functionality so may I know how did you set the grid in two pages and then trying to export that into pdf.
Is the issue occur only after decrease padding ?In order to understand the issue I set up a basic sample of Ultragrid pdf exporting, I would like you to modify the sample , help me reproducing the issue or send a small sample project of your own if you have one.
WinformsSample.zip
Hi Divya,
we are using System.Web.UI.WebControls.GridView for displaying data within grid and generate report using Infragistics.Documents.Reports methods. It generates PDF from byte[] generated from Memory stream using below code.
HttpContext.Current.Response.Clear(); HttpContext.Current.Response.ClearHeaders(); HttpContext.Current.Response.Cache.SetCacheability(HttpCacheability.Public); HttpContext.Current.Response.AddHeader("Content-Type", "application/pdf"); HttpContext.Current.Response.AddHeader("Content-Disposition", String.Format("inline; filename={0}; size={1}", pdfFilename, pdf.Length)); HttpContext.Current.Response.BinaryWrite(pdf); HttpContext.Current.Response.Flush();
and it displays report details can't go beyond 2 pages and it displays header and footer properly. Footer generates on 3rd page.
if i decrease padding and margin of the page - then some of the report detail data which gets truncated starts coming on pdf report but after 2nd page - its not displaying any report detail data.
Pls let us know if you identify any root cause for this.
attached the sample again since its not uploaded 1st time.3666.TestSample.zip
Thank you for the update. If you are using System.Web.UI.WebControls.GridView that means its asp.net grid ,so its not winform control, you posted the question at the wrong post.
But with GridView I also don’t see any code related to WebDocumentExporter, so may I know which infragistics exporter you are using?
The best way for us to assist you is if you provide a small isolated sample that we can run and use for debugging locally.
I also tried setup a demo sample of GridView and pasted all the code you provided, I am not sure if this is the correct demonstration of what you are trying to do .So may be provide your demo sample or modify my sample reproduce the issue for further investigation.