Weird Group Header and Footer Problem

Posted by: kpmoore on 4 August 2017, 2:57 pm EST

  • Posted 4 August 2017, 2:57 pm EST

    We are having a weird problem when the report prints on multiple pages. The report should look like the following:

    Group Header 1
    Detail
    Detail
    Group Footer 1

    Group Header 2
    Detail
    Detail
    Group Footer 2

    In the footer there is a subreport, now the report prints like the following if I have the Repeat option to Repeat on Every page

    Group Header 1
    Detail
    Detail

    Group Header 2 (Which should be group header 1)
    Detail from header 1
    Group Footer 2 (Which should be group footer1)

    And the subreport that should summarize some data related to Group Header 1 doesn't print.

    Any ideas? I have included the DSR file

    2006/08/Details.zip
  • Replied 4 August 2017, 2:57 pm EST

    KPMoore,


    Can you change the BackStyle to ddBKNormal and BackColor to a unique and recognizable color for each of the sections you want to monitor, such as GroupHeaders 1 and 2, and their respective footers? This will tell us whether the Section is printing, and if so in what place.


    Tim

  • Replied 4 August 2017, 2:57 pm EST

    Tim,

    I have incorrectly explained the situation. There isn't two separate headers name Header 1 and Header 2. It is actually one header with two different data elements being displayed. They are being displayed out of sequence. I will try the backstyle suggestion and let you know what happens.
  • Replied 4 August 2017, 2:57 pm EST

    So the backcolour didn't really tell me anything. The data is still out of order and it looks like it is ok. Can you suggest anything else?
  • Replied 4 August 2017, 2:57 pm EST

    KPMoore,


    Did you try setting the GrpKeepTogether property to All for the first group and/or setting the GrpKeepTogether property to None for the second group?


    In regards to the SubReport, you will new to create a new instance of your SubReport first.


    e.g.


    Private Sub GroupFooter1_Format()


        Me.SubReport1.object = New ActiveReport2


    End Sub


    In addition, please refer to the Unbound SubReports walkthrough at http://www.datadynamics.com/Help/AR2Std/HX_Unbound_Subreports.html.


    Tim

  • Replied 4 August 2017, 2:57 pm EST

    Tim,

    I'll change the sub-report but I don't think that will make a difference.

    I have changed the report to GrpKeepTogether = True and it didn't change anything.

    Kevin

  • Replied 4 August 2017, 2:57 pm EST

    In doing some more testing, if I set the Group Repeat property to None, the report works fine and it sequenced correctly but the subsequent pages don't have headings. If I set it to repeat on every page or every page no detail, it causes it to be out of sequence. It looks like the report has just enough data to print on a second page corresponding to the first header of data with the repeat property set to every page this is causing a new page header to print first but the new page header is for the second group of data and the footer printers for the second group and not for the first.

    Hope that I explained that right.
  • Replied 4 August 2017, 2:57 pm EST

    KPMoore,


    If you can get your report to work fine by setting the Repeat property to ddReportNone, then you may be able to simulate the PageHeaders using the Canvas object's Draw methods. For example ...


    Dim rpt As New rptProductionDetail
    rpt.Pages(0).DrawText "Page header", 10, 10, 100, 100


    Otherwise, we will need to be able to reproduce this issue to determine the problem. I'll try to setup a report similar to the one you previously attached to this thread using a sample data source. However, if you currently have a similar project or have any new information, please post to this thread.


    Tim

Need extra support?

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

Learn More

Forum Channels