HasContinued-WillContinue (1 Viewer)

brian189

Registered User.
Local time
Today, 14:58
Joined
Sep 4, 2000
Messages
10
Has anyone had any success using these two events? I am trying to display text based on whether or not the detail section of a report or sub report is spills onto the next page or is continued from the previous page. I'm not having any luck with this. Any help is appreciated.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 09:58
Joined
Feb 19, 2002
Messages
43,233
Nope! I posted this question a few days ago. I've tried every combination I can think of including trying to implement the solution suggested in the knowledge base. I have not found any place where either of these properties will return true! I'm beginning to think the properties don't work the way we think they should but I haven't had the time to test my theory.

I'm trying to produce a code listing as follows:
Code1
Value1
Value2
Value3
Code2
Value1
Value2
.........page break
Code2 - continued
Value3

At the moment I'm thinking that the HasContinued property will only test true if the detail section (or group section) is actually several lines long (not just one as in my report) and the page break occurs within those lines. So --

Code2 morefields morefields morefields
morefields morefields morefields
............page break
Code2-continued morefields morefields

is the only situation when the HasContinued will test true.

Please post back if you happen on the happy combination that makes these properties usable.
 
R

Richie

Guest
Okay I tried HasContinued on a sub report that sometimes spans two pages and found it suprisingly easy to implement for that section, Open the report in design mode and minimize it, create a new macro, select conditions,from the left hand pane expand the loaded report to the section you require,paste into macro window, from the left hand pane select and paste HasContinued property, Save Macro with any name you like. Convert macro to vis basic, open converted macro in design mode and remove Reports!YourRept!Etc and substitute Me.,remove any [] that may appear, You should end up with something looking like:
(Me.Report.Section(0).HasContinued)
In my case I put the following in the group ID footer
Private Sub GroupFooter0_Format(Cancel As Integer, FormatCount As Integer)
If (Me.Report.Section(0).HasContinued) Then
Me.Text30.Visible = True
Else: Me.Text30.Visible = False
End If
When the sub report spanned more than one page the code worked fine, I don't know about page breaks though I haven't tried that.
HTH
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 09:58
Joined
Feb 19, 2002
Messages
43,233
Thanks for your attempts. I did some more research today and determined that my guess above is true. The properties will not ever test true when the section contains only a single print line. The reason it worked in Richie's case is because the sub-report causes the section to span multiple print lines and therefore it is possible for the section to span multiple pages.
 

Users who are viewing this thread

Top Bottom