• ‘Continued from previous page’ in report header

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » ‘Continued from previous page’ in report header

    Author
    Topic
    #1769722

    Hello:
    I am building a multi-page report that contains several group headers. When the group header breaks across several pages I want to make a label visible which reads,

    Viewing 1 reply thread
    Author
    Replies
    • #1784363

      Put your label in the group header or page header, not in the detail and see if that makes a difference. The detail is the wrong place for it anyway.

      • #1784364

        Hi:
        Thanks for the suggestion. I

        • #1784365

          Sorry, I didn’t read your post correctly. I’ve never been able to get WillContinue to work at all, and I’ve seen dozens of posts on the subject to the same effect. However, HasContinued can be made to work, so take a look at it instead.

    • #1784377

      Try dropping the Me!, it doesn’t seem to work well in reports.

      • #1784382

        Thank you for the advice.

        I tried putting the sample code in a Private Sub called from an Event Procedure in the Detail

        • #1784387

          I don’t think Me.Detail will work. You need to use Me.Section(0).

          • #1784393

            Well, I tried it both ways. Using Section(0) and Detail, but neither way work.
            I’ve tried WillContinue and HasContinued same results either way.
            What else can I try?
            Thanks,
            Doug

            • #1784398

              I have found the WillContinue and HasContinued properties to be a bit of a pain. They are really only useful if you have a report in which the detail section is quite long, and it might continue on another page. Don’t confuse this with the typical situation in most reports in which you have a detail section that is only 1 line high. So, if your report recordset is 80 records, you will print the detail section 80 times. But the WillContinue/HasContinued will only kick-in if any particular detail prints on 2 pages. If 1 detail line finishes exactly at the bottom of the page, the next detail will start at the top of the next page, so no WillContinue/HasContinued flags will be set! I found it easier to use the pageno property. If I’m on page 2, then I know the report was continued!

            • #1784403

              Yes, I was just reading Access 97 Developers Handbook by Liwin, Getz, and Gilbert. This is an excellent source of information. The authors lament the fact that WillContinue and HasContinued shows great promise but never lives up to their claim. They say in the book that the only reason they include this topic is for completeness. The properties don

            • #1784409

              If your only intention is merely to detect that you are on some other page other than Page 1, then you can use the Me.PageNo property. For example, create a label (lblContinued) in Page Header and set its caption to “Continued from prior page”. Your code to make it appear on pages 2+ would be:
              lblContinued.visible = (Me.PageNo > 1)

        • #1784410

          No, it doesn’t not in the detail section’s events at all. It belongs in either a page header or a group header. You don’t want a label printing between every record in the detail. You want it to print once on the page if it applies. That means you put it in a header that will print no more than once on a page.

          Oh, and I would recommend you use the OnFormat rather than the OnPrint event. You won’t ever see the results of the OnPrint event except in what comes out of the printer. If you use OnFormat, it will show up in the preview and in the printed document.

    Viewing 1 reply thread
    Reply To: ‘Continued from previous page’ in report header

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: