Keeping a sub-reports headings after second and subsequent pages

Posted by: knesom on 11 September 2018, 9:40 am EST

    • Post Options:
    • Link

    Posted 11 September 2018, 9:40 am EST

    Hello, our company creates several reports that use a main report - sub-report paradigm. The main reports’ page headings needs to print for each page until the first full page of a sub-report is printed wherein we want the sub-report headings to print instead.

    We have this working, albeit on a limited basis where the main report headings are printed on the last page of the main report, after the totaling is done for the main report and then it does print the sub-report headings on the first full page of the sub-report. This was done by putting the main reports’ headings into a group header/footer, leaving the report title, date and page number on the page header. Then in properties for this new group header, we set the RepeatStyle to OnPage so it prints it for every page of the main report.

    On the sub-report, we also created a group header/footer and put the headings in there for it and also set the RepeatStyle to OnPage. If the sub-report only prints one full page and doesn’t roll over to subsequent pages, the report works fine. But…if there is/are second and subsequent sub-report pages to print, the group header doesn’t print. I have tried putting in a Data value in the sub-reports’ group header and increment it so that it triggers the group header format event and prints the group but it doesn’t give desirable results (the headings will print on a page, but not at the top, only randomly between records throughout the rest of the report).

    Is there a way to have sub-report group headers print at the top of the page always once the sub-report is given priority?

    Thanks

  • Posted 12 September 2018, 12:37 am EST

    Hello,

    I am working on our issue. It is very helpful for us if you give us a demo report.

    Thanks,

  • Posted 12 September 2018, 8:52 pm EST

    Hello,

    it triggers the group header format event and prints the group but it doesn’t give desirable results

    Could you please try after adding the “PageBreak” control at the to “GroupHeader” of SubReport. It will lead to a page break after ever group header.

    Thanks,

  • Posted 14 September 2018, 8:42 am EST

    Hi, sorry to take so long to get back. I have taken the report we are having trouble with and took it way down to a very small report that still has the same problem. I have not done yet what you mention above but thought I would provide my report(s) so you can see what exactly I have for results.

    There are 3 variables (one in each for the main and the 2 subreports that can be played with to get other results. With those variables as they are in the reports attached, you will see that Page 4 and 7 of the main report do not print the header for the headings. Page 9 is where the switching of headings happens and the main header prints its’ headings there as well as down the page, the summary subreport prints its’ headings, which is right. Then on Page 10, the summary subreport does print correctly but pages 11, 12 & 13 do not print the headings (summary group header).

    Thanks and I will try as you mention above to see if it works on my sample report and then in my actual report here.PrintAssessmentListing_SKSubreport.zip

  • Posted 14 September 2018, 8:43 am EST

    Oh, and the Main report is PrintAssessmentListing_SK.

    Thanks.

  • Posted 16 September 2018, 8:35 pm EST

    Hello,

    I am unable to run the report at my end. because there are lots of unknown variables. Could you please provide the sample that can be run at my end.

    Thanks,

  • Posted 17 September 2018, 1:51 am EST

    Oh, i think i sent you the actual report, sorry. Attached is the slimmed down version. Thanks.PrintAssessmentListing_SK.zip

  • Posted 17 September 2018, 6:11 pm EST

    Hello,

    Thanks for the modified report.

    I made some changes to the reports as follow:

    1: Change the “GroupKeepTogether” to “ALL” of “SchoolSupport_GroupHeader”, “Hamlet_GroupHeader”, and “Owner_GroupHeader” of “PrintAssessmentListing_SK” Report

    2:Change the “GroupKeepTogether” to “ALL” of “TaxingAuthority_GroupHeader” of “PrintAssessmentSummary_SKAssessmentClass” Report

    Above changes give the desired result. Please refer to the attached sample.

    Hope it helps.

    Thanks,

    SectionReportApplication9.zip

  • Posted 18 September 2018, 1:47 am EST

    Thank You! I did as you mention above and it did give the desired result. Now to implement it on all our reports. :slight_smile:

    Thanks again

  • Posted 18 September 2018, 2:03 am EST

    The results on an actual report though are still not quite the desired outcome we want. By setting GroupKeepTogether to ‘All’, we get some 1/2 empty pages when the following group doesn’t fit on the same page. This may sound okay but our clients have a lot of data they may wish to print.

    For example, I printed the report using the suggested changes and the report was 551 pages in size. When I changed back the value for GroupKeepTogether to ‘None’, it printed 483 pages instead. That may sound okay but that is 68 extra pages that don’t need to print and that’s just on one report we have very many reports that need this functionality we are seeking.

    Is there another way to make this work? When I put the main reports’ group headers to not use the GroupKeepTogether functionality, it prints 28 pages that don’t have the headings group print.

  • Posted 18 September 2018, 7:56 pm EST

    Hello,

    Sorry to mention that there is no another way to achieve this. GroupKeepTogether property specifies whether the section and its footer will print as a single block on the same page. Due to this, you get some empty space when the following group doesn’t fit on the same page. You can change the ‘GroupKeepTogether’ of “GroupHeader” to ‘None’/‘All’ by hit and trial to get the most desired result. As per my suggestion, set the “GroupKeepTogether” property of the top group header to “None” of the report. It may change the page count to less.

    Thanks,

Need extra support?

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

Learn More

Forum Channels