report footers and forced page breaks

G

Guest

I have a report that I am grouping by organization then project. I am
printing an organization header and a project header. I want each project to
print on a separate page and then have the report footer print on the same
page as the last project, not a separate page. I do not need any special
page break by organization.

I have tried setting the project group footer forcenewpage to after section.
This is fine until the last project, then the new page forces the report
footer to be on separate page by itself.

I have also tried setting the project group header with forcenewpage to
before section. This puts the organization header on the first page by
itself without any project info (new page before, duh) which is unacceptable.
But the last page is of course fine.

Then I tried putting code in the pageheader format event
If Me.Page = 1 Then
GroupFooter0.ForceNewPage = 2
GroupHeader1.ForceNewPage = 0
Else
GroupFooter0.ForceNewPage = 0
GroupHeader1.ForceNewPage = 1
End If
This toggles the force new page ok between the project header and the
project footer but it has one problem. When I end up with only 1
organization and 1 project then my page break is set for after the project
footer and it puts the report footer on the second page by myself.

How do I get the report footer onto page 1 if I only have 1
organization/project?

Paula
 
A

ACG

I don't really know the answer but what I would try is to
add another 'if' statement and use a Dcount to count the
number of org's and projects, and if both are 1 dont
force the new page, and if not both 1 use your existing
code.
 
M

Marshall Barton

Paula said:
I have a report that I am grouping by organization then project. I am
printing an organization header and a project header. I want each project to
print on a separate page and then have the report footer print on the same
page as the last project, not a separate page. I do not need any special
page break by organization.

I have tried setting the project group footer forcenewpage to after section.
This is fine until the last project, then the new page forces the report
footer to be on separate page by itself.

I have also tried setting the project group header with forcenewpage to
before section. This puts the organization header on the first page by
itself without any project info (new page before, duh) which is unacceptable.
But the last page is of course fine.

Then I tried putting code in the pageheader format event
If Me.Page = 1 Then
GroupFooter0.ForceNewPage = 2
GroupHeader1.ForceNewPage = 0
Else
GroupFooter0.ForceNewPage = 0
GroupHeader1.ForceNewPage = 1
End If
This toggles the force new page ok between the project header and the
project footer but it has one problem. When I end up with only 1
organization and 1 project then my page break is set for after the project
footer and it puts the report footer on the second page by myself.

How do I get the report footer onto page 1 if I only have 1
organization/project?


I think the requirement is to start a new page for each
organization with the first project in the organization on
the same page. For all additional projects in the same
organization, start a new page.

If that's what your looking for, then set the organization
header's ForceNewPage proerty to Yes to get each
organization header on a new page.

Then use code in the organization header section's Format
event to set the project header's ForceNewPage property:
Me.Section(7).ForceNewPage = 0
This will allow the first project to be on the same page as
the project header.

Use another line of code in the project header's Format
event so any additional projects also start on a new page:
Me.Section(7).ForceNewPage = 1
 

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