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!

page number on subreport

Status
Not open for further replies.

GShen

MIS
Sep 26, 2002
561
US
Dhookem,I know you probably know how to do this. You answered my post the other day on subreports and how to pump out a page heading on every page by creating a dummy grouping. He is my next dilema. I am trying to print page numbers. Each sub report used to have its own page numbers. I scraped that because it is all in 1 main report number in the detail section. So I put the page number on the main form and made the page header invisible. I then referenced this field on the dummy Grouping of =1. It references it ok as well. The problem is, it will not change the page number till the next report starts. This is the heading that I set to REPEAT = YES which is working perfectly fine.

If I cannot get this to sort of REFRESH on every page, then I guess my only alt. is the print the page number from the main report and shrink down every subreport by 1/8".

Any ideas?
Thanks,

Remember when... everything worked and there was a reason for it?
 
Sorry, I don't have much experience with attempting to put anything related to pages in a subreport. It has never been a requirement.

Let me know if you find a solution ;-)

Duane
Hook'D on Access
MS Access MVP
 
Duane,
I found a solution. Too long to post now. Going home. Will post on Monday.... hint, it was not straight forward and it took a lot of playing around... but it works. :)

Remember when... everything worked and there was a reason for it?
 
Duane,
I added 2 fields on the main report. 1 for the page number and 1 for the # of pages. I put them in the page header.
I then set the header to visible = no becauee I did not want to shorten each report.
Then on each sub report, I created the print field Page x Of Y. I set 1 unbound field each for x and y. Then on the ON PRINT event, I set these 2 fields to the page header fields from the main report.
It was not straight forward but it works. My other option was to print the page number from the main report but then I would have to shrink all reports. Maybe I will end up doing that anyway. It is only 1/8 of an inch. The only other issue I had was that I wanted to suppress the page number on the 1st sub report. The way I did it, I don't have the page number on the sub report, so it was easy. :)
Thanks for your help in either case.


Remember when... everything worked and there was a reason for it?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top