Page Header Height Changing back

Posted by: robertg35 on 4 August 2017, 3:06 pm EST

  • Posted 4 August 2017, 3:06 pm EST

    I have a PageHeader height of say 2000.  After processing most of the report I come to just before the footer and change the PegeHeader height to 1000. I do this becase at this point I run a subreport and remove some labels and push the subreport detail up the page.

    Problem:
    The PageHeader height is only at 1000 for the first page of the subreport then jumps back to 2000.


    What's going on here?


    -R

  • Replied 4 August 2017, 3:06 pm EST

    Hello ,


    Could you send me a sample of used code?


    Thanks,


    Sergey Romanov.

  • Replied 4 August 2017, 3:06 pm EST

    Here you go..
  • Replied 4 August 2017, 3:06 pm EST

    Ooops....  here it is 


    2007/08/rptAdvTaskAudit.zip
  • Replied 4 August 2017, 3:06 pm EST

    I add this to my subreportL


    Private Sub ActiveReport_PageStart()
    Debug.Print "Starting Page height:" & ParentReport.PageHeader.Height
    End Sub


    Private Sub ActiveReport_PageEnd()
    Debug.Print "Ending Page Height:" & ParentReport.PageHeader.Height
    End Sub


    Not surprisingly I get the following inthe immediate window:


    Starting Page height:1100
    Ending Page Height:1100
    Starting Page height:1100
    Starting Page height:1490
    Ending Page Height:1100


    I even added ParentReport.PageHeader.Height = 1100 within both of those subs and still get the same results.


    Anyone?


     


     


     SergeyR wrote:


    Hello ,


    Could you send me a sample of used code?


    Thanks,


    Sergey Romanov.

  • Replied 4 August 2017, 3:06 pm EST

    Well....  Adding this to the parent report solved the problem:


    Private Sub PageHeader_Format()
      If bSubReport = True Then


        Line1.Y1 = 1090
        Line1.Y2 = 1090
       
        PageHeader.Height = 1100
      End If
    End Sub

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels