visible sub report

S

sam

Hi,
I have a main report with a subreport, linked via primary and foreign keys.
Not all records in the main report have any detail in the sub report but for
each record it shows either the details as it should or a space where the sub
report sits (empty space when there is no related record in the sub report)
I'm wondering if someone can tell me how to make the subreport invisible if
there is no detail in the sub report? i.e. only show the sub report if it
contains detail. (grouping is on the primary key, amongst others, with the
sub report sitting in the footer of this section which I would like to keep
to enable me to make visible or invisible this section for a summary/detail
report.... which I know how to do.)
 
A

Allen Browne

Open the main report in design view.

Set the CanShrink property of the subreport control to Yes.

The (Detail?) Section of the report also has a CanShrink property that needs
to be set so the section does not use up the space.
 
S

sam

Thanks Allen, that seems to have done ther trick however I had to move the
subreport into the detail section as when I had it in the primary key footer
I had hoped to leave it in it would only show me the first record of the
subreport. I don't know why it does this and will make it impossible for me
to have a visible/invisible section for summary/detail. I can get around it
by making a duplicate of the report, one with the subreport and open which
ever is required but would have been nice to just have the one.
 
Top