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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SubReport Placement

Status
Not open for further replies.

shelby55

Technical User
Jun 27, 2003
1,229
CA
Hello

I am using Access 2002.

I have a subreport where data is in the detail section and I had headings in the page header. I placed the subreport in a main report in the detail section but the headings aren't showing up. So where should it be placed so I can show these headings?

I don't want them to be in the main report because they are based on number of months of data selected so if in Main then will show up even if no data warranting spread to page 2.

Thanks.

 
Subreports have no concept of pages. You might be able to use the Report Header section of the subreport. It you need repeating header sections, you can create a top level group header in your subreport based on a constant expression like:
=1
Display the header for this new section and set its Repeat Section property to Yes.

Duane
Hook'D on Access
MS Access MVP
 
Hi

Thanks for the speedy reply Duane. I guess I'm not understanding because if I view just the subreport then I can see the header with the data as I want. Data is in detail section and page header has the headings.

But when I view from the main report, I don't get headings. You indicate "group headings" and if I select sorting and grouping and grouper header = yes I do get the header but it shows for each item in the group and I only want it to show once. Again, the data is in the details section in the subreport so shouldn't I be able to just have headers in the page header and have it show?

Thanks.
 
Just put headers in on your main report above your subreport (you may have to adjust them a bit to show above the data correctly).

Bob Larson
FORMER Microsoft Access MVP (2008-2009, 2009-2010)
Free Tutorials/Samples/Tools:
 
Hi

Actually I just read somewhere that page headers don't show up in subreports on main reports but to use group headings as Duane suggested. Since the report will only ever be run for one Department, I can group on that because then the headers will only show up once.

Incidentally the other post I read (posted by another person) from the website Bytes and answered by Rick Brant suggested:
Add a top level group section to the sub-reports using an expression like 1=1 and set
the RepeatSection property to True. It will act just like a Page Header only it will still work when used as a sub-report.


Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top