2
votes

I am creating a report using SSRS 2008 consisting of a page with a single tablix, a header, and a footer. As far as I'm concern, the report itself isn't that complex. But when I tried to export it to PDF format for printing, several issues ensue:

  • When using the expression ="Page " & Globals!PageNumber & " of " & Globals!TotalPages in a textbox in the header, the displayed TotalPage number is not equal to the actual total pages in the report.

  • The pages after the printed TotalPages in the report does not display the page header and footer anymore. For example the actual total page number of the report is 50 but whats printed in the header is Page x of 42; after page 42, the pages does not display the Header and Footer anymore

  • The tablix applies pagebreaks at random pages eventhough there is no pagebreak condition to any group in the tablix nor on the tablix itself causing half of the page to be blank and the continuation is on the next page.

Does anyone know any fix or workaround on these issues? I've searched high and low on the internet on how to fix these issues but I always arrive at dead end. Please leave comments that you think can help, it will be greatly appreciated. Thanks!

1
Check for the spaces between tablix and header and footer and also make sure that your report body size is smaller than the report widthMahesh
@CoderofCode Thanks for your respond but checking and experimenting on the page size and margins is one of the many things i tried. The report body is 8in,6in while the PageSize is 8.5in,11in with margin of 0.1in on all sides.JBrian
@JBrian you said your report body size was 8 inch by 6 inch ... is that just your report body or your report body and your headers and footers as well?Bactos
@Bactos by report body, what I mean is the area excluding the header and footer. So, aside from the 8 inch by 6 inch report body, the page also consists of 2 inch header and 0.75 inch footer. Do you have any idea on what causes the issue? thanksJBrian
@JBrian - Most issues that come from page issues have to deal with some spacing issues and overlooking something like a text box that can grow and is placed in an odd place. However you should also check and make sure you have your updates for reporting environment: support.microsoft.com/kb/2647120?wa=wsignin1.0Bactos

1 Answers

0
votes

I've helped solve a similar problem a few weeks ago.

Sometimes, any errors in expressions or custom code has side-effects that cascades into the report layout (sometimes causing pagination anomalies, layout issues, etc.). Just check if your expressions are error free, or if there are any scenarios that can cause some expressions or custom code to have errors (like null references, etc).

Also, check if you are calling custom code in a hidden control. From experience with SSRS 2008, custom code inside a hidden control or table row produces side-effects on total page counts, although I've yet to verify if these side effects still happen on newer versions of SSRS (like SSRS 2008 R2).