Blank extra page when sub report is blank

Sharkfin

New member
Local time
Today, 16:03
Joined
Jan 3, 2012
Messages
3
Hi folks.

In Access 2002 have a two-page report that includes a sub-report as the lower half of the first page.

That sub-report can legitimately be blank at times, in which case that whole area of paper will be left blank. This is desired behaviour.

However, I have noticed that when the sub-report is [correctly] blank, a third page suddenly appears on the print preview. It has the page header and footer as I would expect, and nothing from page two has spilt over.

My page size is well within the physical paper size (A4) even taking into acount the small margins. I've tried shortening the detail section of the main report and reducing the width too, just in case. Margins also reduced but to no effect.

As stated, when the sub-report has data to print, the preview only has two pages, so this is proper weird. Oh, I've also been through several variations of cangrow, canshrink, keeptogether etc, all to no avail.

Any ideas?
 
Did you set the Can Shrink and Can Grow properties of the subreport control to Yes?
 
Did you set the Can Shrink and Can Grow properties of the subreport control to Yes?

Indeed I did. Also on the detail section of the subreport itself.

Everything appears as intended when the subreport is populated (and actually does so also when it is validly blank, in as much as a blank space is then left on the page) but the real mystery to me is that an extra blank page is appended to the report when the subreport is null.

The subreport displays data from a different table that is linked, in a one-to-one relationship, to the data in the parent report.
 
I have worked around the problem and now have the report working as desired.

I was misleading when I said that the subreport showed data from a related table. In actual fact it was showing a subset of data from the same query as the main report (though the fields in the subreport were from a different table to all the others).

Anyway, I have effectively sidestepped the problem by removing the subreport entirely, including all the fields in the main report and then placing a large white rectangle over the ones that should sometimes be hidden. A macro is then used to hide that rectangle if the fields should be printed.
 
Pleased to see you came up with your own solution.
 

Users who are viewing this thread

Back
Top Bottom