force new page conditionally

  • Thread starter Thread starter Guest
  • Start date Start date
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.
 
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
 
Back
Top