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

Keeping empty subreport visible

P: n/a
Hi All,
I have a report which has several sub-reports on it, Each sub-report
has its own record source and child/parent link.
Sometimes a sub-report may not have data for an entered policy nbr and
on the report thier is just an empty space where that sub-report would
be when that happens.

How do I get the sub-report to still display on the report when it has
no data????

I've tried putting code in the 'No Data' event of the sub-report but
that does not even get kicked-off when the underlining query has no
data.
thanks
bobh.

Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
As you found the subreport prints nothing at all if the is no data in its
RecordSource.

If you still want its column headings to show even when there is no data to
print, the simplest option it to move the heading labels out of the
subreport, and onto the main report.

You can also do stuff like this in the Control Source of a text box on the
main report:
=IIf([Sub1].[Report].[HasData], Null, "Whatever you want to say.")
where Sub1 is the name of the subreport control.

If those ideas are not enough, you have to somehow get something into the
subreport's RecordSource. Changing the subreport's RecordSource to a UNION
query that contains at least one blank record would be one approach.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"bobh" <vu******@isp.com> wrote in message
news:11**********************@g44g2000cwa.googlegr oups.com...
Hi All,
I have a report which has several sub-reports on it, Each sub-report
has its own record source and child/parent link.
Sometimes a sub-report may not have data for an entered policy nbr and
on the report thier is just an empty space where that sub-report would
be when that happens.

How do I get the sub-report to still display on the report when it has
no data????

I've tried putting code in the 'No Data' event of the sub-report but
that does not even get kicked-off when the underlining query has no
data.
thanks
bobh

Nov 13 '05 #2

P: n/a
Allen,
Yes, keeping the sub-report labels visible is exactly what I want to
do. Thanks for your suggestions, I'll give them a try.
bobh.

Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.