Solved Printing a report that contains sub-reports over multiple pages. (1 Viewer)

WhySoBad

New member
Local time
Today, 12:23
Joined
Apr 30, 2022
Messages
4
I have a report containing sub-forms that prints perfectly when all of the report sections fit on the first page.
It will also print perfectly onto the second page if the detail section is the section that overflows to the next page.
But, it all goes pear-shaped when the footer section which contains 3 sub-reports is the section that overflows to the next page.
Rows get split horizontally and/or are overlaid onto the page footer of the first page and/or onto the header of the second page.
Have searched high and low for the answer, there are many suggestions, but none that have been truly workable.
The consensus seems to be that Access cannot do it, but I'm not convinced.
A PDF (AAA) of a one page print-out which works great is attached. The footer section starts at the "Items Total".
A PDF (BBB) of an overflow example is also attached.
Have tried a few "onformat event" VBA suggestions, but none were truly effective.
 

Attachments

  • AAA.pdf
    202.4 KB · Views: 97
Last edited:

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 10:23
Joined
May 7, 2009
Messages
16,394
why not use the detail section for the subreports rather than on the footer.
 

WhySoBad

New member
Local time
Today, 12:23
Joined
Apr 30, 2022
Messages
4
why not use the detail section for the subreports rather than on the footer.
Thanks arnelgp. I removed the record source for the Items from the detail section and cleared the textboxes, leaving the detail section empty. Then made a sub-report for Items. Then added the Items sub-report, and the other sub-reports to the detail section. Excellent results obtained on page overflows, except that can't get the sub-report headings to repeat again over the page.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 10:23
Joined
May 7, 2009
Messages
16,394
open your subreports (one by one) in design view.
then create a Group (on Expression, just put double quote for the expression, "").
next, move all your report headings (of your subreport) to the this group section
and adjust the report/page heading (still in subreport) to 0 height.
 

WhySoBad

New member
Local time
Today, 12:23
Joined
Apr 30, 2022
Messages
4
open your subreports (one by one) in design view.
then create a Group (on Expression, just put double quote for the expression, "").
next, move all your report headings (of your subreport) to the this group section
and adjust the report/page heading (still in subreport) to 0 height.
Thanks. Have done as suggested, seems to be now bullet-proof in regard to the row splitting and over-printing problems. But still not re-printing the sub-report header on next page when an overflow occurs. Have experimented with adding page-headers to each sub-report, but no difference.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 10:23
Joined
May 7, 2009
Messages
16,394
did you follow my last post.
you create a Group in your report (subreport) and move the header there.
see this demo. open subReport report in design view.
see that i moved the Column header to the Group section (GroupHeader0).
the Repeat Section property of this Section must be set to Yes.
open MainReport in print preview.
 

Attachments

  • SubReportHeader.accdb
    992 KB · Views: 88

WhySoBad

New member
Local time
Today, 12:23
Joined
Apr 30, 2022
Messages
4
did you follow my last post.
you create a Group in your report (subreport) and move the header there.
see this demo. open subReport report in design view.
see that i moved the Column header to the Group section (GroupHeader0).
the Repeat Section property of this Section must be set to Yes.
open MainReport in print preview.
Many thanks. Everything working perfect now. Have attached a (zipped) mock-up db with just the necessary tables and reports for you to demo the ReportBBB. Thanks again.
 

Attachments

  • Database5.zip
    1.6 MB · Views: 76

Users who are viewing this thread

Top Bottom