I want subreports to display in even if they have no associated da

M

mark909

Ive produced a report wuith numerous subreports thats generating using a
number of different queries.

It is run using a form with a Combo Box that has different Project_IDs. The
queries are set up using [Forms]![Formname]![Combobox Name] in criteria.

However not all Projects have data relating to each of the different
subreports.

This results in blank spaces in reports where there is no data relating to a
subreport.

How do I set up the subreports to display even if there is no data to be
associated with them?

Thanks for help :)
 
A

Arvin Meyer MVP

mark909 said:
Ive produced a report wuith numerous subreports thats generating using a
number of different queries.

It is run using a form with a Combo Box that has different Project_IDs.
The
queries are set up using [Forms]![Formname]![Combobox Name] in criteria.

However not all Projects have data relating to each of the different
subreports.

This results in blank spaces in reports where there is no data relating to
a
subreport.

You can set the CanShrink property of the Detail Section to Yes, and the
blank spaces will disappear.
How do I set up the subreports to display even if there is no data to be
associated with them?

What would you want to display? There is nothing there. You could force
zeros to replace Nulls, and that would give it some data.
 
A

Armen Stein

What would you want to display? There is nothing there. You could force
zeros to replace Nulls, and that would give it some data.

Hi Arvin, sometimes people want to show a subreport heading even when
no data exists - maybe that's what the OP is asking. However, the
whole subreport will disappear when it has no data.

One way around this is to include the main table (the Master table) in
the recordsource of the subreport with an outer join (the arrow
pointing toward the Child table). This will ensure that there is
always one "record" (filled with Nulls) in the subreport, causing it
to print.

Another way is to move your headings out to the main report, but this
is a bit unwieldy later when you want to rearrange your report layout.

Hope this helps,

Armen Stein
Microsoft Access MVP
www.JStreetTech.com
 
A

Arvin Meyer MVP

Armen Stein said:
Hi Arvin, sometimes people want to show a subreport heading even when
no data exists - maybe that's what the OP is asking. However, the
whole subreport will disappear when it has no data.

One way around this is to include the main table (the Master table) in
the recordsource of the subreport with an outer join (the arrow
pointing toward the Child table). This will ensure that there is
always one "record" (filled with Nulls) in the subreport, causing it
to print.

Another way is to move your headings out to the main report, but this
is a bit unwieldy later when you want to rearrange your report layout.

My reasoning for changing nulls to zeros is 2 fold. First it shows that the
values for that particular record are not really of consequence, (I realize
that Zero is actually a value), and second it avoids unwieldy expressions in
the footers if there is a Count or Sum textbox.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top