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:<br><br>Group Header 1<br>Detail<br>Detail <br>Group Footer 1<br><New Page><br>Group Header 2<br>Detail<br>Detail<br>Group Footer 2<br><br>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<br><br>Group Header 1<br>Detail<br>Detail<br><Page Break><br>Group Header 2 (Which should be group header 1)<br>Detail from header 1<br>Group Footer 2 (Which should be group footer1)<br><br>And the subreport that should summarize some data related to Group Header 1 doesn't print.<br><br>Any ideas? I have included the DSR file <br>
    2006/08/Details.zip
  • Replied 4 August 2017, 2:57 pm EST

    <P>KPMoore,</P>
    <P>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.</P>
    <P>Tim</P>
  • Replied 4 August 2017, 2:57 pm EST

    Tim,<br><br>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.<br>
  • 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?<br>
  • Replied 4 August 2017, 2:57 pm EST

    <P>KPMoore,</P>
    <P>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?</P>
    <P>In regards to the SubReport, you will new to create a new instance of your SubReport first. </P>
    <P>e.g.</P>
    <P>Private Sub GroupFooter1_Format()</P>
    <P>    Me.SubReport1.object = New ActiveReport2</P>
    <P>End Sub</P>
    <P>In addition, please refer to the Unbound SubReports walkthrough at <A HREF="/Help/AR2Std/HX_Unbound_Subreports.html">http://www.datadynamics.com/Help/AR2Std/HX_Unbound_Subreports.html</A>.</P>
    <P>Tim</P>
  • Replied 4 August 2017, 2:57 pm EST

    Tim,<br><br>I'll change the sub-report but I don't think that will make a difference. <br><br>I have changed the report to GrpKeepTogether = True and it didn't change anything.<br><br>Kevin<br><br>
  • 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.<br><br>Hope that I explained that right.<br>
  • Replied 4 August 2017, 2:57 pm EST

    <P>KPMoore,</P>
    <P>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 ...</P>
    <P>Dim rpt As New rptProductionDetail<BR>rpt.Pages(0).DrawText "Page header", 10, 10, 100, 100</P>
    <P>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.</P>
    <P>Tim</P>
Need extra support?

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

Learn More

Forum Channels