Group Header Showing Data From Next Group If Data Spans Two Pages

Posted by: james222222 on 4 August 2017, 3:21 pm EST

  • Posted 4 August 2017, 3:21 pm EST

    Hello,

    I have a report which lists outstanding tasks for each user in our database. In the group header of this report is, amongst other fields, the user name. Let's assume we have two users A1 and A2. When A1's outstanding tasks fill page one and just one further outstanding task spills onto page 2, the group header displays A2's user name.

    This behaviour does not happen if A1's outstanding tasks fit onto one page or if more than one outstanding task for A1 is displayed on page 2 and beyond. A2's task list is unaffected by this.

    I've tweaked all the options I can see but without success. Can anyone help please?

    Regards
    James
  • Replied 4 August 2017, 3:21 pm EST

    Hi Prantik,

    Thanks for responding. The report is attached.

    Regards,
    James

    2012/02/Report1.rpx
  • Replied 4 August 2017, 3:21 pm EST

    James,

    Please attach the RPX of the report for me to analyze.

    Regards,
    Prantik
  • Replied 4 August 2017, 3:21 pm EST

    James,

    I could not find any grouping on the sql statement for the report. Please take a look at this link that explains Grouping in ActiveReports.Further, it seems that you are trying to group the reports on a calculated field. If this is so, you will need to take the approach as described here.

    Regards,
    Prantik
  • Replied 4 August 2017, 3:21 pm EST

    James,

    What is th build of ActiveReports 2.0 that you are currently using? If on an earlier build, please upgrade to the latest one from this link.
    I am still unable to reproduce the said behavior. It seems that the report used to generate the pdf attached in the earlier post was different than the one you posted.Could you please reattach the same, so that I could test further?

    Regards,
    Prantik
  • Replied 4 August 2017, 3:21 pm EST

    Morning Prantik,

    We're using version 2.5.0.1322 of Active Reports.

    The .csv data in the post dated 16th February at 3:48pm was used in the generation of the .pdf attached in the post dated 16th February at 3:49pm.

    If you are unable to recreate the problem perhaps we should redesign the report.

    If I move the user name (actually called executive in the report - sorry for an confusion. I thought it would be easier to call our executives users!) data field from the group header to the page header, this erroneous behaviour still occurs. I'm wondering whether one possible solution here is to move the page counter from the group header to the page header, set the group header.repeat to '0-None' and add a calculated field into the page header which displays the user name on the first page but replaces this with 'continued ...' for all subsequent pages.

    In the attached .rpx file I've added the following code into the PageHeader script editor but without success.

    Sub OnFormat
    If rpt.GroupHeader1.IsRepeating Then
        rpt.Fields("txtContinued").visible = true
    End If
    End Sub

    Can you tell me what I am doing wrong please?

    Regards
    James

    2012/02/Test Report With Header Change.rpx
  • Replied 4 August 2017, 3:21 pm EST

    Morning Prantik,

    I've corrected and attached the report and the SQL grouping is now showing in the ADO Data Control.

    Thanks for the links, I'll have a look through them now.

    Regards
    James

    2012/02/Report1_DEV.rpx
  • Replied 4 August 2017, 3:21 pm EST

    James,

    Please let me know if you were able to get proper groupings in the report. If the issue still exists, a small sample connecting to a temporary recordset would be helpful for me to diagnose.

    Regards,
    Prantik
  • Replied 4 August 2017, 3:21 pm EST

    Hi Prantik,

    Thank you for the links but unfortunately they did not help me to resolve the problem. I'm hoping the following helps you to diagnose. If you create the following SQL table:

    CREATE TABLE [dbo].[VEC_CASEREVIEWTEST](
        [ID] [int] NULL,
        [CASECODE] [varchar](50) NULL,
        [RUNEXEC] [varchar](50) NULL,
        [REVIEWEXEC] [varchar](50) NULL,
        [CLIENT] [varchar](50) NULL,
        [EXECRETURNDATE] [datetime] NULL,
        [BACKFROMEXEC] [varchar](50) NULL,
        [REPORTYYPE] [varchar](50) NULL,
        [FRIENDLYNAME] [varchar](50) NULL,
        [DAYS] [int] NULL
    ) ON [PRIMARY]


    and populate it with the data in the attached .csv file you should get the erroneous behaviour described in my first post and shown in the attached .pdf file in the next post. Whereby the group header on the second page shows the username of the user from the third page despite there being one record on the second page that belongs to the first user.

    I hope that helps. Please let me know if you need anything further from me.

    Regards
    James

    2012/02/Test Data.csv
  • Replied 4 August 2017, 3:21 pm EST

    Test report as promised.

    2012/02/Test Report.pdf
  • Replied 4 August 2017, 3:21 pm EST

    James,

    Dealing with the original problem, I have created a report similar to the PDF you sent and binding to a database similar to the one whose csv you sent earlier. The report seems to behave as expected at my end. Could you please try modifying it to display the behavior for me to take a look?

    Regards,
    Prantik

    2012/02/Sample-2.zip
  • Replied 4 August 2017, 3:21 pm EST

    Hi Prantik,

    That's fixed it! Changing the grouping from a SQL grouping to a calculated grouping has resolved the problem.

    Thank you so much for your help.

    Best regards,
    James
Need extra support?

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

Learn More

Forum Channels