question

AbhishekBhosekar-6177 avatar image
0 Votes"
AbhishekBhosekar-6177 asked EM-3331 commented

Incorrect Total Pages in SSRS (2014) Report for PDF

I am working on Invoice Report(SSRS 2014) which is a huge report consist of multiple sub reports for notes and Terms and conditions. I have used Standard Global Variable to show the page numbers as Globals!PageNumber & " of " & Globals!TotalPages .But, its showing incorrect total pages if the PDF have 9 pages only it will show in the total pages textbox as 10 (1 of 10). In the last page of the PDF shows 9 f 10 pages ,there is no page after the 9th page ,No blank spaces as well. Globals!TotalPages causing the problem. This issue is not coming frequently it is coming for only 2 or 3 invoices among 50. Anyone has any idea to get rid of this issue?

sql-server-reporting-services
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I am having the same issue. Margins are within the page size, no field overflow and when I print it reads 1 of 4, while only 2 pages are prinitng

0 Votes 0 ·

I resolved my issue. The issue had to do with the Keep-With-Group property.

Use the Advanced Mode to check each of the static members. Mine was the last static and it was Keep-with-Group Before. When I changed it to After, the problem was resolved.

Its as if SSRS tried to keep it together but the rendering inserted some "invisible pages" to accomplish that. I actually saw these "invisible pages" after I deleted the header. I saw all four pages instead of two, which prompted me to look for the Advance Mode properties.

hope that helps.

0 Votes 0 ·

1 Answer

Joyzhao-MSFT avatar image
0 Votes"
Joyzhao-MSFT answered AbhishekBhosekar-6177 edited

Hi @AbhishekBhosekar-6177 ,
Does the behavior of adding extra page numbers only happen when exporting to PDF format?
To ensure that the report size is not the cause of the extra page increase, please make sure: (Body Width + Left margin + Right margin) <= (Page width)

If you have any operations such as grouping or adding page breaks in the report, please let me know.
Best Regards,
Joy


If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

· 5
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @Joyzhao-MSFT Thank you for reply
-Actually, issue is not in Page Number but its in total pages and yes, it is happening only in PDF format.
- Yes (Body Width + Left margin + Right margin) <= (Page width) it is less than my page size
- My Page Width is 8.5 and body width ,left and right margins is 8.41
- 8.41 <=8.5

  • yes, I have a groups and page break in the report.



0 Votes 0 ·
Joyzhao-MSFT avatar image Joyzhao-MSFT AbhishekBhosekar-6177 ·

This is really weird. After checking a lot of information, no similar cases were found. I will do further research. If this phenomenon only exists in this report, then the most likely problem is the report itself.

0 Votes 0 ·

@joyzhao-MSFT - Yes. This is really weird. Sometimes, report has more data it is working fine But, sometimes its not. .I am also not able to find what actually causing the problem is its a data or something else.

0 Votes 0 ·
Show more comments