Page numbering issue in SSRS 2008 R2 when converting to PDF
For rdl files created in SSRS 2008, the page numbering will render Page 1 of 0 but only for PDF. Using OverallTotalPages instead of TotalPages only works on a 2008 R2 server. On 2008, OverallTotalPages causes an error. How do I get the page numbering to work on PDF without using OverallTotalPages? I need to be able to change the files, do testing, then updgrade the SSRS instance. I can't break existing SSRS 2008 reports. thanks -Dave
October 27th, 2010 12:43pm

Hi Dave, I am using SSRS 2008 (sp1) + adobe reader 9.0 PDF on my computer, the page numbering always works. This should not be product issue. So, please try it on other computers with different verions of pdf. My expression putted on the report footer page is =Globals!PageNumber.ToString() + " of " + Globals!TotalPages.ToString(). thanks, Jerry
Free Windows Admin Tool Kit Click here and download it now
October 28th, 2010 1:24am

Jerry, I just upgraded my test server to SQL Server 2008 R2 Cumulative Update 6 from SQL Server 2008 SP2 Cumulative Update 1. I have the same issue as DDdev and am using Adobe Reader 9.4.3 on my PC. I am using the exact page number expression you are. I have also seen a problem with page numbering in MHTML export format, with a two page report rendering "Page 1 of 2" on the first page and "Page 2 of 3" on the second page. I also get problems with page numbering in the report viewer, with the report showing "Page 1 of 0". It would seem MS has broken page numbering in SSRS. I too cannot use R2-specific terms since I cannot upgrade production yet and have multiple reports with page numbering (among other) issues. Since I have the latest CU for R2, is there anything else MS can suggest to get page numbering working? Thanks, JCP
April 11th, 2011 2:14pm

Fixed my own problem (and yours). I was reading the MSDN info on adding page numbering to reports after my first post. Besides the fact that there is an error in the text (the topic said to add "TotalPages" to the expression, which is not recognized - it has to be Globals!TotalPages), I noticed that they were using ampersands in the expression instead of plus signs. By changing the expression to ="Page " & Globals!PageNumber.ToString() & " of " & Globals!TotalPages.ToString() the page numbering worked in the viewer, PDF, and MHTML. It also worked in my test SQL 2008 R2 environment and my production SQL 2008 environment. Now I just have to figure out a mis-aligned column problem in one of my reports.
Free Windows Admin Tool Kit Click here and download it now
April 11th, 2011 2:31pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics