Hello everyone first post here!
Now that's out of the way, down to business. By solving one problem I have created another, over and over and over again.
Overview:
I have a report that contains 19 subreports. The main report uses a onload macro that checks a text box value and either makes a specific subreport visible or not. There are ~15 of those checks and associated text boxes that control the visibility of the 19 subreports. My expressions look like
...
If (Me.Q2V.Value = 1) Then
rptsub_R07.Visible = True
End If
...
Original Problem:
The last line on each page of the report was getting cut in half horizontally. As in the top half of the word was on the bottom of one page and the lower half of the word was on the next page.
First Fix:
To fix that problem I put each subreport in a group with the group expression being "=1" or some other arbitrary number. Then the keep together function would not allow my words to get split in half. That would have been the end and my report would have been beautiful and all the functions would have worked. Except I could only have a maximum of 10 groups.
Second Fix:
To get around that problem I created two additional subreports that had their own groups and subreports, subreport 6 through 13 and subreport 14 through 18, to spread the load and allow me to keep using the keep together functions. However this broke my visibility macro and now the subreports within the subreports don't become visible when required. It's all or nothing, visible or not. The subreports that don't have subreports are still working as expected.
The Question:
How can I use the main reports onload macro to control the visibility field of a subreport within a subreport? If I can't keep using the onload macro then that is fine, I just need another solution.