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