AR 12 - Page Break inserts extra blank page

Posted by: anatekar on 25 December 2018, 9:48 am EST

    • Post Options:
    • Link

    Posted 25 December 2018, 9:48 am EST

    Hello,

    I am generating a multi-page report which is made up of sub reports.

    The layout of the report is such that there exists a main section report, which contains four containers for four sub section reports.

    Each of these four sub section reports can further contain multiple sub section reports.

    To be able to display data in the right format I have to insert a page break manually when sub section reports within the four containers are being printed. Gist of the calculation is that I am able to identify if the size of the subreport and if that size exceeds the available space on the current page, then I insert a new page by doing this

    detail.NewPage = NewPage.Before;

    For most cases the report works just fine. But only when the first sub report container prints two sub reports each having 6 lines, there is no enough space to print data from the second sub report container. When a new page is added in this case, the report also inserts an extra blank page.

    What is funny is if I print 7 lines instead of 6 it works just fine. I have created a sample console application and attached the same. If you run it as is a pdf report will get generated in “C:\Temp\TeamReport_” with a timestamp.

    If you uncomment line 33 and line 48 in Program.cs and rerun, the report prints fine. I am not sure why only 6 lines causes an issue.

    Please let me know if you need more information. It is kind of urgent for us, so am hoping you get to take a look at this quickly.

    Thanks

    Amit

    ActiveReportPagination.zip

  • Posted 25 December 2018, 7:51 pm EST

    Hello Amit,

    As of now I unable to find the reason for this behavior. However, as a workaround could you please change the size of the following items:

    GroupHeader1(of PlayerDetailsSectionReport report) from “.326” to “.325”

    Shape1(of PlayerDetailsSectionReport report) from “7.986, 0.326 in” to “7.986, 0.325 in”

    Please check the above workaround in your main sample. If the workaround is not suitable for you, please let me know.

    Thanks.

  • Posted 26 December 2018, 2:53 am EST

    Thank Mohit. That seemed to do the trick. I had tried something similar with adjusting the height before I posted the query, but I was doing it for the whole sub section report, and did not think of the groupHeader and its contents.

    Thanks again!

    -Amit

Need extra support?

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

Learn More

Forum Channels