force new page conditionally

G

Guest

I have a report with nested sections. I want the first section to begin on
the first page along with the report header and then for subsequent sections
to be on new pages. Setting "force new page after section" for the the
section footer makes this happen except, and here is the question, it forces
the report footer onto a new page. Is there some way to do all the above but
to prevent the report footer from being pushed to a new page. What I want is
a means of turning off force new page after the last section, or conversly,
turn on force new page in the section header after the first page.
 
M

Marshall Barton

johnb said:
I have a report with nested sections. I want the first section to begin on
the first page along with the report header and then for subsequent sections
to be on new pages. Setting "force new page after section" for the the
section footer makes this happen except, and here is the question, it forces
the report footer onto a new page. Is there some way to do all the above but
to prevent the report footer from being pushed to a new page. What I want is
a means of turning off force new page after the last section, or conversly,
turn on force new page in the section header after the first page.


I've never quite figured out what setting the ForceNewPage
property in code actually does, certainly not what I would
like it to do.

You can get the result you want by adding a page break
control named pgEject at the very top of the group header.

Also add a text box named txtGrpCnt to the group header and
set its control source expression to =1 and RunningSum
property to Over All.

Now, you can use code in the group header's Format event to
make the page break visible or not as needed:

Me.pgEject,Visible = (Me.txtGrpCnt > 1)

Make sure you set the group's ForceNewPage property to None
 

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