Keep together subReports

  • Thread starter Thread starter Derek Brown
  • Start date Start date
D

Derek Brown

Hi all

Well been working on this a while! How do you get subreports to stay
together on a page and stop half of a 3 line report starting on one page and
finishing on another. I have everything I can see set to keep together but
it just ignors me (and laughs) and continues to do exactly what it likes.
The three lines are separate fields with one line per field and i am
printing a report in two columns A4 landscape.

Help
 
Derek said:
Well been working on this a while! How do you get subreports to stay
together on a page and stop half of a 3 line report starting on one page and
finishing on another. I have everything I can see set to keep together but
it just ignors me (and laughs) and continues to do exactly what it likes.
The three lines are separate fields with one line per field and i am
printing a report in two columns A4 landscape.


Don't forget that you can only use KeepTogether for a single
instance of a single section. This means that the main
report section that contains the subreport is where you need
to use the KeepTogether property. If the mainreport detail
section has a bunch of other stuff before or after the
subreport that you don't need to keep together, then use
Sorting and Grouping on the detail's primary key field to
split the data across three sections.

Maybe(??) there's another way that can be done in the
subreport. Create a group in the subreport on the
expression =1 and set the **groups** KeepTogether property
to Whole Group.
 
Hi Marshall

Tried last suggestion, I have inserted a new group cut and pasted three
fields to the new sextion (=1) and set group keep together as whole group,
but still have problem. Am I doing something wrong?? The three fields are in
the same section with its keep together as yes but it does not.
Help
 
Sorry for the delay, but I am having trouble finding the
time to set up a report to duplicate your situation. I hope
to get to it later today or tomorrow.
 
Well, you can scrap that last suggestion and use the first
one.

Set the main report detail section's KeepTogether property
to Yes.

If you only want the subreport to be kept together and don't
care about any other stuff in the detail section. Create a
main report grouping on a unique field in the main report's
record source table/query. Set the Group Header and/or
Footer properties to Yes. Then move the other stuff to the
header/footer as desired. The subreport will then be the
only thing still in the detail section and will stay
together.
 
thank you Marshall


Marshall Barton said:
Well, you can scrap that last suggestion and use the first
one.

Set the main report detail section's KeepTogether property
to Yes.

If you only want the subreport to be kept together and don't
care about any other stuff in the detail section. Create a
main report grouping on a unique field in the main report's
record source table/query. Set the Group Header and/or
Footer properties to Yes. Then move the other stuff to the
header/footer as desired. The subreport will then be the
only thing still in the detail section and will stay
together.
--
Marsh
MVP [MS Access]



Derek said:
Tried last suggestion, I have inserted a new group cut and pasted three
fields to the new sextion (=1) and set group keep together as whole group,
but still have problem. Am I doing something wrong?? The three fields are
in
the same section with its keep together as yes but it does not.
 
Back
Top