After adding all the content I need to a report (which will be published as a PDF document) I need to know how many pages the exported PDF document will have. How do I determine the number of pages in my report?
Thanks.
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.
i dont know
The issue of the Generate() method ignoring the code that is being executed after it had been fixed in the latest Service Pack. 9.1.20091.2029.
There is also a workaround that is to create a new report and assign it to the old report and call the Generate() method of the new report to get the number of pages.
Magued
Hi,
This issue was never brought to Developer Support by the first customer in this thread. We figured this scenario was no longer an issue. However, I have sent this to Developer Support myself so that they created an incident. This has to go through development to see why this happens and if they can do something about it. I understand how the document engine works very well and one thing I can speak to is that the design of the engine is pretty much that of a "linear" execution model. This means that the code (both internal and external to the engine) executes top-down. There are no collections or accessible objects as we know them in OOP land, however, this model offers much greater performance and a much more tighter code base.
In the meantime while this is being looked at, as a work-around, you may want to try and use logic similar to the following:
Execute your code until it reaches the point where you need to determine the number of pages. Once you determine that number, discard the report and then start over again and then go PAST the point where you discovered the page count. This way you can create your document from start to finish on the second pass with knowledge of how many pages you have.
Here is the case number for the incident that was submitted for you:
CAS-26127-CB532K
You can use that number to refer to your case / incident when going through Developer Support:
http://es.infragistics.com/support/default.aspx#Overview
Was this ever submitted as a bug? I've noticed this same behavior in v2009.1, which was just recently released. I also just submitted a support request today related to this same issue. I'm hoping that this is already in the list of known bugs and that it is already being worked on. Having the ability to determine the number of pages so that I can add content afterwards is key to the project that I am working on.