Subreport Group Header and Details do not stay togather

  • Thread starter Thread starter JerryR
  • Start date Start date
J

JerryR

I have a report with five subreports. Each
subreport "Grouping" groups the Group label and the
Details. When I run the subreport alone, the Group label
and the Details "Keep Togather" as they should (i.e.; If
the next label and detail group do not fit on the bottom
of the page, both are moved to the next page). However,
when I run the Main report with the subreports, if a
subreport will not fit on the bottom of the page, I
sometimes get the subreport Group label on one page and
the details on the next. Is there some way to force the
subreports to "Keep Togather" if the subreport does not
fit at the bottom of a page??
 
The trick is to place each subreport into a different Section of the main
report.

Assuming the source of the main report has a unique key field named "ID",
open its Sorting And Grouping box, and enter ID. In the lower pane, choose
Yes for Group Header and also for Group Footer. You now have 3 sections for
every record: ID_Header, Detail, and ID_Footer.

Repeat, so the ID appears on the next line of the Sorting'n'Grouping dialog
also, and give this one a Group Header and Group Footer also. Now you have 5
sections.

Place one subreport in each section, and set each section's Keep Together
property to Yes. This trick instructs Access to keep each subreport
together, but to allow breaks between the subreports.
 
Thanks, That "trick" worked!!!


-----Original Message-----
The trick is to place each subreport into a different Section of the main
report.

Assuming the source of the main report has a unique key field named "ID",
open its Sorting And Grouping box, and enter ID. In the lower pane, choose
Yes for Group Header and also for Group Footer. You now have 3 sections for
every record: ID_Header, Detail, and ID_Footer.

Repeat, so the ID appears on the next line of the Sorting'n'Grouping dialog
also, and give this one a Group Header and Group Footer also. Now you have 5
sections.

Place one subreport in each section, and set each section's Keep Together
property to Yes. This trick instructs Access to keep each subreport
together, but to allow breaks between the subreports.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.




.
 
And it still works! I am using Access in Office 365 and was unable to solve the problem of sub reports "splitting" across pages when I didn't want them to. There are limitations to the number of Groupings you can have in the main report, however this solution works for up to 21 sub reports which was more than enough for the 5 sub reports I was wanted to use in one main report. So thanks Allen!
 
Back
Top