Organizing Report Pages

T

Thorson

I have a report that I am the process of adding sub-reports to. I have 2
sub-reports added to it, each of which have a page break right before them to
force a new page. All of the details for the main report and the sub-reports
are in the report footer, so that they do not repeat. I am having problems
with 2 things:

1. The first problem is that my report title, when placed in the report
header section forces the main report onto the next page; however if it is in
the page header section it does not do this. There is obviously enough room
for it to all fit on the first page. I tried adjusting the page margins,
however if the title is in the report header it still pushes the main report
onto the next page, how do I prevent this.

2. The second problem is that if I have the titles of my sub-report columns
in the page header of the sub-report they do not show up in the report. I
therefore moved them to the report header of the sub-report... which works
but then they do not show up on every page the report is on. how can I fix
this?
 
A

Allen Browne

Re #1
In report design view, descrease the height of the Report Header section, or
the height of the Detail section, or decrease the Top or Bottom margins (in
the Page Setup dialog.)

If appropriate, you might also set Keep Together as No.

Another possibility is setting the CanShrink property of both the relevant
controls and also of their Section, so the section can shrink vertically if
there is nothing to show on any line.

Re #2
As you found, the main report's Page Header/Footer is used, and those of the
subreport are ignored.

To work around that, use a group header in the subreport that repeats on
each page:

1. Open the subreport in design view.

2. In the Sorting And Grouping pane, on the first row, insert a group with
an expression that will be the same all the way through the report, e.g.:
=0

3. In the lower pane of S'n'G, set Group Header to Yes.
Access adds a new Group Header to report design.

4. Set the Repeat Section property of this section to Yes.
It will now repeat on each page.

5. Move the labels you have in the Page Header into this Group Header.
 
T

Thorson

#1:
I set my top and bottom margins as small as they would go I also set the
shrink property to yes. The main report does not have a group so I did not
change the "keep together" property. This still did not fix the problem.

It is obvious that there is enough room on the first page for the report
header, page header and main report section, it does all fit when the title
is in the page header instead of the report header.

Does it matter that the main report is in the report footer instead of the
detail section? It is in the report footer section because when it was in
the detail section it would repeat multiple times around the sub-reports.

#2:
I set a group and put the titles in the group header section for the
sub-reports. However, I am using Access 2007 and cannot find the "repeat
section" property, where is it located? The only similar thing I can find in
the "group, sort and total" box is the "keep together" option for the group.

Thank you for your help.
 
A

Allen Browne

Responses in-line.

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

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

Thorson said:
#1:
I set my top and bottom margins as small as they would go I also set the
shrink property to yes. The main report does not have a group so I did
not
change the "keep together" property. This still did not fix the problem.

The Detail section does have a Keep together property.
Right-click the gray bar that says Detail, and choose Properties.
On the Format tab of the Properties sheet, you will find Keep Together.

You will also find Force New Page.
Set this to None.

Set both these properties (Force New Page and Keep Together) for the Report
Header and the Report Footer sections as well.
It is obvious that there is enough room on the first page for the report
header, page header and main report section, it does all fit when the
title
is in the page header instead of the report header.

Does it matter that the main report is in the report footer instead of the
detail section? It is in the report footer section because when it was in
the detail section it would repeat multiple times around the sub-reports.

It will depend on the settings you have for Force New Page and Keep Together
for the Report Footer section, and also for the subreport's sections.
#2:
I set a group and put the titles in the group header section for the
sub-reports. However, I am using Access 2007 and cannot find the "repeat
section" property, where is it located? The only similar thing I can find
in
the "group, sort and total" box is the "keep together" option for the
group.

Repeat Section is on the Format tab of the Properties sheet, when you have a
group header selected.
 
T

Thorson

The sub-report page headers work great! thanks!

I am still having trouble getting the first page onto one page. I set the
Force New Page and Keep Together settings as you suggested, but nothing
changed. I did notice that when I moved the main report to the detail
section it did all go onto the first page correctly, however it then repeated
unnecessary text boxes and labels after each item from the query reported.
For now I just left the main report's section in the report footer and I put
the title back in the page header section.

Thank you for all your help.
 
T

Thorson

I added a group header section to my main report... that solved the problem
with the first page.

Thanks again!
 

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