Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Control set to =[Page] & " of " & [Pages]

Status
Not open for further replies.

zevw

MIS
Jul 3, 2001
697
US
I don't know how to overcome this issue. When I preview the report it displays the Pages with 1 less then what it really is, for example if there are 5 pages it will display
1 of 4, 2 of 4, 3 of 4, 4 of 4, AND 5 of 4.

However when it prints it displays the right number 1 of 5 through 5 of 5.

Why is it displaying 5 of 4 when I am previewing?
Is there a way to get around this?

P.S. I have 2 sub-reports in my report footer which make up the last page.
 
basically, when you preview the report, it will render each page individually based on the recordset for the report.

however because you have 2 subreports, they will use force a new page, however the dataset for your main report only has enough data for 4 pages, thus, you'll only get 4 pages. When you get to the sub reports, it sees the subreports and then says oh, there's another page...

not really sure how to get around this, perhaps you can try to force the displaying of the subreports on report open, maybe attempt to move to the last page of the report in the onOpen event or something...

--------------------
Procrastinate Now!
 
Can you explain what you mean by

"maybe attempt to move to the last page of the report in the onOpen event or something."

Thanks for your time and help!!
 
in the onOpen event of the report, have some code to move to the last page of the report...

actually, would probably be better in the onFormat event...

--------------------
Procrastinate Now!
 
Do you mean to instead of having it in the report footer I should move it to the last page of the report? and then the report will calulate the page count properly.

Well, the reason I have it in the report footer is because I want to have a page break before these 2 subreports.
 
in that case, try putting a hidden text box bound to pages in the main report's footer, and then use that value as the pages value...

not really sure that will work though. Do you really need to have the pages in there?

--------------------
Procrastinate Now!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top