on 06-30-2009 9:46 PM
Hi-
I have a problem with one of my CR 2008 reports. Under the right conditions, I will get page 5 of 4 or 6 of 5 on the last page. I have a report footer section that contains a subreport. Normally when the report footer prints, it it only requires 1 page and the page numbering is fine. If the subreport is long enough to require an extra page, the Page N of M function seems to miss the last page in the calculation of number of pages.
Has anyone else seen this or have any suggestions on how to fix it?
Thanks.
Try to use special fields pagenumber and totalpagecount and place them one beside the other and see the output.
Regards,
Raghavendra
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I figured out what was going on. I had a page header that I only wanted to show at the end of the report (in the report footer). To do this, I had used the suppression formula to suppress the section for all but the last page, using PageNumber <> TotalPageCount for the suppression function. Unfortunately, Crystal Reports needs to know whether or not it's going to display the header in order to calculate TotalPageCount. Therefore, in order to calculate TotalPageCount, it needs to know TotalPageCount (cyclic reference).
I hope this might help someone in the future.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The page numbering is still wrong when I used the solution that I proposed.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Just an update. If I preview the report, navigate to the final page (so the page selector shows the correct pages) and then make a change to the report (like delete a text object), the page numbering is corrected when it refreshes. This is why I thought I had the solution earlier. Note that refresh (F5) will not fix the page number since the page calculation starts over.
I figured out a workaround. My report footer contains 3 sections -- a subreport in each of the first two and static text in the third. I moved the static text from the third section to the bottom of the second subreport and removed the third section. The page numbering is now correct.
I got the idea because, after some testing, I determined that the error did not occur when the section overflows on to a new page, but rather when it is just long enough to cause the third section to be printed on a new page by itself.
Thanks for the help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.