Hi!
By default, access hides the report header and footer for subreports that have no data. Do you know of any way of forcing it to show them always?
Thanks!
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Show Report Header and Footer for Empty Subreport (Access 97)
Does the thread starting at post 471,222 help?
Thanks, Hans, but that’s not really what I’m after.
I would like to force the subreports to appear on the main report, even if they have no data (i.e. the report header and footer to show, although presumably not the detail section since this would be empty). If you open a data-less report directly, you do get headers and footers, but if you open the same report as a subreport, you see nothing.
One way I could achieve this is to move the headers and footers to the main report, leaving only the detail section in the subreport. The reason I’m reluctant to do this is that it would make it harder to get the controls to align nicely whenever I make changes to the subreport.
Any other ideas, anyone? If not, I’ll use Plan B.
Regards,
Mark
The only wat to always display the subreport’s report header and/or footer would be to ensure that there is always at least one record in the subreport, with blank values if necessary. You can do this as follows:
– If the record source of the subreport is a table, create a query based on this table; if the record source is a query, edit this query.
– Add the table (or query) behind the main report to the new query.
– Join the main report table/query to the original ones by the field/fields on which the subreport is linked to the main report.
– Double click the join line(s) and change the join to a left join that returns all records from the table/query behind the main report.
– Replace the link field(s) in the query with the corresponding one(s) from the table/query behind the main report.
– Close and save the query.
– Open the subreport in design view.
– Set the new query as its record source.
– Save and close the subreport.
– Open the main report in design view.
– Click once on the subreport.
– Set the Link Child Fields property to the same as the Link Master Fields property (this is possible because we have added those fields to the record source of the subreport.
– Save and close the main report.
This takes less time to do than to write it down!
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.
Notifications