Access How to prevent subReport from breaking across pages?


Joined
Jul 8, 2018
Messages
1
Reaction score
0
I have a dynamic REPORT, the contents of which are determined by "sections" (subjects) of information needed
and selected by a user from a FORM. These "sections" are TABBED PAGES on the form and there are about 30 of them.
Every RECORD can thus have a siginificant quantity of different combinations of "sections". On PREVIEW / PRINT
each "section" is a subREPORT however, ONLY THOSE WITH DATA appear on the report. No subreport consumes an entire
page and - depending on their heights (variable) - more than one can fit a single page. The number of pages needed
is not important to me. The structure is such that there are no large blank spaces or blank pages on the REPORT.
All of this works very well (I'm running Access 2016).

There is only 1 PROBLEM ISSUE at this point: If the last subREPORT on a page will not fit entirely on that page, that
subREPORT gets broken so that PART of the subREPORT appears at the top of the next page. The OBJECTIVE of this Post is
to find a solution that will force the subREPORTS move - as a complete single section - to the next page instead of
breaking. The following typical solutions do not work;

* "KeepTogether" does not work on "SUBreports" no matter where it is applied.

* I cannot use GROUPING/SORTING because the limit is about 20 using headers and footers, and I have about 30.

* Simply inserting a conventional "pagebreak" on the report would simply add pages and bloat the report to the extreme.

I am actually quite a novice at developing with this complexity, so any solution will need to be conveyed with the
complete coding to try please. I don't need suggestions like having less "subreports". There are indications online that
my objective is "IMPOSSIBLE" and maybe it is. I suspect that a solution - if there is one - will be a long, complex code
the can somehow determine the HEIGHT of the subREPORTS and the space available for it, then force a page break if it wont fit.
 
Ad

Advertisements

Joined
Jul 22, 2018
Messages
5
Reaction score
4
Not sure how the data tables are structured but it sounds like you were trying to create groupings on individual topics, not on 'topic' as a variable field. Set your report to group by topic (variable) and put your subreport in the group header. In the header properties set keep together as true and in the subreport set as keep together. Not sure this is the exact sequence given the lack of details on data structure but this hopefully points you in the right direction.
 

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