Vanishing subreports

  • Thread starter Thread starter jschping
  • Start date Start date
J

jschping

Hi,

I have a report with 2 subreports right after each other. Each subreport has
inside of it a label, and then a few fields.

For some reason, the second subreport will only show up if the FIRST one has
data. Then the second shows up even if it has no data! And if the first one
has no data, then both will be skipped, even though the second one does have
data!

I have checked "Yes Shrink" on everything, main report, subreport, etc.

I can't figure it out.

Thanks.
 
jschping said:
I have a report with 2 subreports right after each other. Each subreport has
inside of it a label, and then a few fields.

For some reason, the second subreport will only show up if the FIRST one has
data. Then the second shows up even if it has no data! And if the first one
has no data, then both will be skipped, even though the second one does have
data!

I have checked "Yes Shrink" on everything, main report, subreport, etc.


First, a subreport will not display anything if it has no
data.

Second, CanShrink on a subreport control only reclaims
vertical space if the needed space is less than the Height
of the control in design view (or the subreport control is
not visible) AND CanShrink is also set on the section
containing the subreport AND there are no other controls
that span the subreport control's design Height.

With that in mind (and barring corruption),
"For some reason, the second subreport will
only show up if the FIRST one has data"
can only happen if you have some code in the section's
Format event procedure that makes the second subreport
invisible when the first subreport has no data.

OTOH,
"the FIRST one has data. Then the second
shows up even if it has no data"
can never happen because there is nothing in the second
subreport to "show up"

If things really are what you are describing, I would have
to conclude that something has gone seriously wrong. Either
you have a corrupted report or your install of Access has
been mangled.
 
Back
Top