Determining the Position of a Subreport

  • Thread starter Thread starter clane
  • Start date Start date
C

clane

I have a report with several subreports. Each subreport
has its can grow and shrink set to true because in some
cases some of the sub reports may not print out.

Each of the sub reports has a header and detail area and I
am having a problem with the header of a subreport
printing very close to the bottom of a page and the detail
portion being lost 'in the page footer'. I have group
together set per page.

My questions is: is there a way to determine the location
of a subreport in relation to the PAGE at the time of
formating/printing? And, if it is below a point on that
page to force printing to the next page?
 
The simplest solution is to put each subreport into a different section of
the main report. Set the main report's sections' Keep Together property to
Yes. If the whole section (i.e. the entire subreport) won't fit on the page,
this feeds it to the next page.

To create lots of sections:
1. Open the main report in design view.

2. Open the Sorting'n'Grouping dialog (View menu).

3. Select a field that is unique (primary key if you want the subreports for
every record of the main report).

4. In the lower pane of the dialog, choose Yes for Group Header and also for
Group Footer.

5. On the next pane of the dialog, choose the same field again, and set a
group header and group footer.

6. Repeat, using the same field as many times as you need to get a section
for each subreport.
 
Back
Top