Assumption: you're using the subreport for things like items within one order.? You only want to see this page header once: Move it to the subreports report header or copy it and place it on the main report above the subreport?
No great help...need a bit more info on what you want to do with this. Gord
ghubbell@total.net
What i have is a sub report that contains multiple records from a table. There could be a dozen records that will fit onto one page, or a hundred records that will spread over several pages. By putting my page header info (Column titles) into the report header it only appears on the first page of the sub report. I cannot put anything on the master report as this is made up of around 26 seperate sub reports. What i am trying to achieve is for the Column titles to appear at the top of the subreport on each page of the master report that it spreads over.
Each subreport is a different section of the report and is placed in the detail section and set to 'CanGrow' with a page break between it and the next one.
I think I've got it...
On your master report in its PageHeader section add duplicate textboxes: Text1, Text2 (containing whatever it is you want to show.)
On the master reports Detail OnFormat event add this:
If Me.FormatCount > 1 Then
Me.Text1.Visible = True
Me.Text2.Visible = False
Else
Me.Text1.Visible = False
Me.Text2.Visible = True
End If
This works here for me although with 26 (uggh!) sub reports there may be other issues. I think the real key is the page you're dealing with is the master reports page, not the sub's page. I could not find another method to produce this result. Please advise if sucessful! Gord
ghubbell@total.net
P.S. What's your query run time & processor before you can preview a report with 26 subs?
Thanks for your help with this, although i havent had time to try your latest suggestion yet (it may even be a week or so!), i'll let you know the results.
As far as query run time, each sub report has its own SQl recordsource and nothing is linked, it only takes 20 secs (on a bad day) to get the print preview up, sometimes even less! Thats on a P2 350Mhz, 128Mb machine.
Sorry to butt in like this but I am having the same problem and being new to Access I haven't got a clue what you are going on about Gord!!!
I have 9 Sub reports in one main report, half of the reports have page headers and footers which I need to show as they are either column headers or section numbers etc...
Hi Tatty,
What I've found playing with Martin's problem is that (in my tests anyway), when a subreport is an a "main", and you have many pages in the report, the pages are the mains pages, not the subs. In other words, it appears that sub reports can't have "page headers" that work. (Again, this is from my tests and perhaps someone could prove me wrong!).
For Martin and I suspect for yourself, we "cheat" a little, and by placing two twin text boxes or labels in the main reports page header, then testing against the number of times the detail section has to be formatted, we display one or the other. Why two texts or labels? On each real page you would only want to see one, so when a report runs 1 or 2 main pages (but remember: the quantity of main pages is caused by the length of the sub and controlled by the format count) we trick Access by turning on the main reports Text or Label and Turning off the twin that should only appear if we format the page more than once. We certainly don't want to see both Texts or Labels on a single page report and if we don't use this trick you would only get 1 Text or Label on your mains first page. Not the greatest explanation but I would suggest that you give the example a try and see how it reacts for you. Enjoy!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.