Report problem - Long

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Trevor Best

    #1

    Report problem - Long

    I have a report that's fairly simple, page headers and footers, detail
    has a subreport in (can vary in length). The customer wanted a signature
    block for them, their client and 3rd party. This was no problem, couple
    of boxes and labels in the report footer.

    Now customer wants this signature block on the foot of page 1 (stoopid
    IMO as that implies people read page 1 where at the end implies they
    read past page 1 at least).

    Anyway to save sizing lots of controls I put the sig block into a
    subreport so I have one object to worry about on the report. I put this
    in the page footer and I also have a standard footer in a subreport
    (with report name and page x of y). I then put some code in the page
    footer format event to position the sig block based on if we're on page
    1 so it's where it starts from on page 1 but subsequrnty pages squash it
    up, make it invisible, move the std footer up and squash the height of
    the footer section.

    Since putting this code in the number of pages don't calculate in the
    subreport (=Report.Parent .Pages) but that's a minor issue, I can force a
    calculation using a textbox (=Pages) on the main report.

    The problem started when you go to page 2 the items looked like they had
    a severe argument with the page footer but page 3 onwards was OK. I put
    this down to the fact that the items thought the page footer was big
    then it shrunk itself, same problem returning to page 1 after the last
    page, the items would overlap the footer.

    I thought to solve that by putting the code into the page header event
    so that the page footer would grow or shrink before the items were done.
    Started out fine, Page 2 looked perfect, the items had made freinds with
    the page footer again but the next bit makes no sense to me at all. If I
    go to the last page then return to page 1, the items overlap the page
    footer again.

    The page header code does run on page 1 as the footer grew and the sig
    block appeared but the items acted as though the page footer was at it's
    small size.

    This also happens if I force the =Pages calculation (as that really just
    runs the report to the last page then back top page 1 again without
    actually displaying it).

    Now another odd thing, the report had 213 pages, if I type in say 2000
    into the page number it intelligently goes to the last page, I then go
    back to page 1 and it's perfect. It's only if I explicitly go to the
    last page the problem appears on page 1 (or if I force =Pages calculation)

    I can see 2 ways around this if only I knew how to do it <g>
    1. Find out why the items on page 1 don't see the page footer in time.
    2. Open the report, go to page <far too many>, get the page number and
    set the controlsource of my page count accordingly then return to page 1
    But I can't seem to find a way of navigating a report in preview mode
    programatically .

    If only we had a Page 1 footer is different to page 2 onwards footer,
    like Word does.

    Or if anyone knows how format a report thus:

    <-----------------------
    Page 1 header
    -------------
    Item 1
    Item 2
    Item 3
    [Sig Block] < few boxes
    -----------
    Page Footer
    -----------[pgbrk]
    Page 2 header
    -----------
    Item 4
    Item 5
    Item 6
    Item 7
    -----------
    Page footer
    -----------
    ----------------------->

    Baring in mind the items are of variable height so there's no x items
    per page that I can calculate.

    --
    This sig left intentionally blank
  • PC Datasheet

    #2
    Re: Report problem - Long

    Put the sig block directly in the page footer rather than a subreport. Put
    the following code in the page footer format event:
    Private Sub PageFooter_Form at(Cancel As Integer, FormatCount As Integer)
    If Page = 1 Then
    Reports!NameOfR eport.Section(4 ).Visible = True
    Else
    Reports!NameOfR eport.Section(4 ).Visible = False
    End Sub

    The only thing here is that anything else in the page footer will not be
    seen on the first page. If that is critical, you could make the sig block
    visible on Page 1 and not visible on succeeding pages.

    --
    PC Datasheet
    Your Resource For Help With Access, Excel And Word Applications
    resource@pcdata sheet.com





    "Trevor Best" <nospam@besty.o rg.uk> wrote in message
    news:4214eb81$0 $32607$db0fefd9 @news.zen.co.uk ...[color=blue]
    > I have a report that's fairly simple, page headers and footers, detail
    > has a subreport in (can vary in length). The customer wanted a signature
    > block for them, their client and 3rd party. This was no problem, couple
    > of boxes and labels in the report footer.
    >
    > Now customer wants this signature block on the foot of page 1 (stoopid
    > IMO as that implies people read page 1 where at the end implies they
    > read past page 1 at least).
    >
    > Anyway to save sizing lots of controls I put the sig block into a
    > subreport so I have one object to worry about on the report. I put this
    > in the page footer and I also have a standard footer in a subreport
    > (with report name and page x of y). I then put some code in the page
    > footer format event to position the sig block based on if we're on page
    > 1 so it's where it starts from on page 1 but subsequrnty pages squash it
    > up, make it invisible, move the std footer up and squash the height of
    > the footer section.
    >
    > Since putting this code in the number of pages don't calculate in the
    > subreport (=Report.Parent .Pages) but that's a minor issue, I can force a[/color]
    [color=blue]
    > calculation using a textbox (=Pages) on the main report.
    >
    > The problem started when you go to page 2 the items looked like they had
    > a severe argument with the page footer but page 3 onwards was OK. I put
    > this down to the fact that the items thought the page footer was big
    > then it shrunk itself, same problem returning to page 1 after the last
    > page, the items would overlap the footer.
    >
    > I thought to solve that by putting the code into the page header event
    > so that the page footer would grow or shrink before the items were done.
    > Started out fine, Page 2 looked perfect, the items had made freinds with
    > the page footer again but the next bit makes no sense to me at all. If I
    > go to the last page then return to page 1, the items overlap the page
    > footer again.
    >
    > The page header code does run on page 1 as the footer grew and the sig
    > block appeared but the items acted as though the page footer was at it's
    > small size.
    >
    > This also happens if I force the =Pages calculation (as that really just
    > runs the report to the last page then back top page 1 again without
    > actually displaying it).
    >
    > Now another odd thing, the report had 213 pages, if I type in say 2000
    > into the page number it intelligently goes to the last page, I then go
    > back to page 1 and it's perfect. It's only if I explicitly go to the
    > last page the problem appears on page 1 (or if I force =Pages calculation)
    >
    > I can see 2 ways around this if only I knew how to do it <g>
    > 1. Find out why the items on page 1 don't see the page footer in time.
    > 2. Open the report, go to page <far too many>, get the page number and
    > set the controlsource of my page count accordingly then return to page 1
    > But I can't seem to find a way of navigating a report in preview mode
    > programatically .
    >
    > If only we had a Page 1 footer is different to page 2 onwards footer,
    > like Word does.
    >
    > Or if anyone knows how format a report thus:
    >
    > <-----------------------
    > Page 1 header
    > -------------
    > Item 1
    > Item 2
    > Item 3
    > [Sig Block] < few boxes
    > -----------
    > Page Footer
    > -----------[pgbrk]
    > Page 2 header
    > -----------
    > Item 4
    > Item 5
    > Item 6
    > Item 7
    > -----------
    > Page footer
    > -----------
    > ----------------------->
    >
    > Baring in mind the items are of variable height so there's no x items
    > per page that I can calculate.
    >
    > --
    > This sig left intentionally blank[/color]


    Comment

    • Trevor Best

      #3
      Re: Report problem - Long

      Thanks for replying but that would make the page footer only visible on
      page 1, the page numbering wouldn't then be on the subsequent pages.
      Besides which when I tried it, the footer didn't even appear on page 1
      :-\.

      The problem seems to be that when returning to page 1, the code isn't
      being run.

      Comment

      • David Schofield

        #4
        Re: Report problem - Long


        Trevor
        Maybe you could use code in


        David

        Comment

        • Trevor Best

          #5
          Re: Report problem - Long

          David Schofield wrote:[color=blue]
          > Trevor
          > Maybe you could use code in
          > http://www.lebans.com/lastgroupheaderfooter.htm[/color]

          Thanks, I'll give that a go on Monday.

          --
          This sig left intentionally blank

          Comment

          Working...