Printing a Repeated Section Messege like "Continued"

C

Chris v.

Setting the repeated section property in a report (Access 2007) to Yes,
writes the section Heading on the next page when the detail section is not
complete at the page break. I would like the bottom of the first page to
print "Continued on Next Page" and/or the top of the second page to say
"Continued from ...)" so the report reader knows the details are part of the
previous section on the previous page, and not in an entriely new section of
the report. Can this be done dynamically in a report, since some pages
naturally break when a section ends and other pages break in the middle of
the details? I don't see any properties that will allow this. Will I have to
write some VBA to accomplish this?

Thanks for your help.
 
M

Marshall Barton

Chris said:
Setting the repeated section property in a report (Access 2007) to Yes,
writes the section Heading on the next page when the detail section is not
complete at the page break. I would like the bottom of the first page to
print "Continued on Next Page" and/or the top of the second page to say
"Continued from ...)" so the report reader knows the details are part of the
previous section on the previous page, and not in an entriely new section of
the report. Can this be done dynamically in a report, since some pages
naturally break when a section ends and other pages break in the middle of
the details? I don't see any properties that will allow this. Will I have to
write some VBA to accomplish this?


You can get a "continued" text box in the header by adding a
text box (named txtDetailNum) to the detail section. Set
its expression to =1 and RunningSum property to Over Group.
Then the header section text box can use the expression:
=IIf(txtDetailNum > 1, "continued", "")
You should also set the detail section's KeepTogether
property to Yes and set the group's KeepTogether to With
First Detail

To get a page footer text box to indicate more on the next
page, add a text box (named txtDetailCount) to the group
header section and set tis expression to =Count(*) Then the
page footer text box expression would be like:
=IIf(txtDetailNum < txtDetailCount, "continued", "")
 
S

Scott68

I tried this in MS access 2003 and both counts always = 1. I am using
subreports and the subreports sometimes continue to the next page.

I want the main page header to say "continued from previous page" and the
main page footer to say "continued on next page".

I was able to use http://support.microsoft.com/default.aspx/kb/207624
successfully, but i can't figure out "continued on next page" for the footer.

Please help
 
M

Marshall Barton

Scott68 said:
I tried this in MS access 2003 and both counts always = 1. I am using
subreports and the subreports sometimes continue to the next page.

I want the main page header to say "continued from previous page" and the
main page footer to say "continued on next page".

I was able to use http://support.microsoft.com/default.aspx/kb/207624
successfully, but i can't figure out "continued on next page" for the footer.


When you have CanGrow details, even that article is not
totally reliable. I think a better way is to introduce an
additional group with header and footer that are used only
to signal the start and end of a group (or detail). Set
this dummy group header and footer section's Visible
property to No.

Add an invisible text box (named txtGroupStarted) to the
Report Header section.

Code for the group header section's Format event:
Me.txtGroupStarted = True
and the group footer:
Me.txtGroupStarted = False

Then the page footer text box can use an expression like:
=[grouping field] & IIf(txtGroupStarted, " (continued on
next page)", "")

And the page header text box:
=[grouping field] & IIf(txtGroupStarted, " (continued from
previous page)", "")

Now, the question is what field/expression do you use for
this dummy group and what level it should be in the grouping
list. These things depend on exactly what groups you have
in your report and I don't want to speculate on that without
more information.
 

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