By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,847 Members | 2,483 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,847 IT Pros & Developers. It's quick & easy.

Blank Sub Reports - A variation

P: n/a
JW
The problem of hiding / showing a sub reports on No Data is often asked, my
problem here is a little different.

My Main report has, as a page header, company details (so each company to a
new page). My detail contains four sub reports (linked as child by
CompanyID to the master) each report may be blank or may have data. If all
subreports are empty my page just has the Company detail in the header and
an otherwise blank page.

The main report is based on the table of companies, the subreports are based
on queries that check for missing data, the only common factor in all child
reports is the CompanyID.

Can anyone tell me how to only have pages where there is a related child
report?

Thank you,

Jon

Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Use a query as the source for the main report.
In the query, use a subquery or joins to eliminate companies that have no
child records.

For example, include the related tables in the company query, ensuring that
you use outer joins. In the query, add a WHERE clause such as:
NOT (table1.ID Is Null AND table2.ID Is Null AND table3.ID Is Null)

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html

"JW" <jon_webb@#NOSPAM#yahoo.com> wrote in message
news:bj**********@hercules.btinternet.com...
The problem of hiding / showing a sub reports on No Data is often asked, my problem here is a little different.

My Main report has, as a page header, company details (so each company to a new page). My detail contains four sub reports (linked as child by
CompanyID to the master) each report may be blank or may have data. If all subreports are empty my page just has the Company detail in the header and
an otherwise blank page.

The main report is based on the table of companies, the subreports are based on queries that check for missing data, the only common factor in all child reports is the CompanyID.

Can anyone tell me how to only have pages where there is a related child
report?

Thank you,

Jon


Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.