Print "Continued" only if the group header repeats

B

Brian Smith

I have a report with a nested group headers. In the highest group header I
have set the repeat section property to yes. I want the report to say
"(continued)" on pages where the group header has been repeated. I have
tried using the following if statement:

=IIf( Section(5).HasContinued = -1,"(Continued)","False")

False always appears on every page no matter whether or not the group header
continues onto the next page. However, no matter what I do I can't get the
has continued property to be true.

Please help me. Thank you in advance.

Brian
 
D

David Carnes

"False" is a string

False is a constant, so try it without the quotes.

HTH,
Dave
 
M

Marshall Barton

Brian said:
I have a report with a nested group headers. In the highest group header I
have set the repeat section property to yes. I want the report to say
"(continued)" on pages where the group header has been repeated. I have
tried using the following if statement:

=IIf( Section(5).HasContinued = -1,"(Continued)","False")

False always appears on every page no matter whether or not the group header
continues onto the next page. However, no matter what I do I can't get the
has continued property to be true.

HasContinued only applies to a single instance of the
section, not the entire group (even then it rarely does what
we think it should).

The way I do it is to add a text box to the detail section.
Set the text box's Name to txtDetailCount, control source
expression to =1 and RunningSum to Over Group.

Then you can test the value of the text box to make the
label(?) with the word "Continued" Visible or not as needed.
Using VBA in the group header's Format event:

lblContinued.Visible = (Me.txtDetailCount > 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