This is a migrated thread and some comments may be shown as answers.

PageBreak problems - empty page after every page that contains data

4 Answers 597 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Karl Wilkens
Top achievements
Rank 1
Karl Wilkens asked on 27 Jan 2011, 04:37 PM
Hi,

We are using Q3 SP1 Reports in a Web Report, and have a single group footer section where we have tried using PageBreak=After as well as PageBreak=Before. Either way, we get page page of report data as expected, followed by a blank page, then repeat x the 300 pages that are in this report. We have looked and there are no other, duplicate PageBreak statements that would cause this. We just have a simple pageheader, detail section, a groupfooter where we are setting the pagebreak, and a pageFooter section.

Any help appreciated.

4 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 01 Feb 2011, 04:13 PM
Hello Karl Wilkens,

Generally there are several cases when empty page may occur:
  • Report Width is greater than the available page space (Page Width - Left Margin - Right Margin).
  • There is a sub-report, which contains a report that is too wide, and while at design-time that is not obvious, at run-time it might cause the carry over to occur.
  • There is a report item with boundaries going out to the right from its parent section.

In order to see which items are causing the problem, simply change their background to a different, more contrasting color and export it to PDF. The rendered report will immediately give you a clue about the items which are at fault.

For additional information check out the Problem: Telerik Reporting renders blank pages KB article.

Greetings,
Peter
the Telerik team
Get started with Telerik Reporting with numerous videos and detailed documentation.
0
Nathaniel
Top achievements
Rank 1
answered on 14 Mar 2011, 10:49 PM
I think this might be a bug because I am running into the exact same problem as the opening poster. Also using Q3 2010. Only page 2 is blank. I followed the suggestions in the link, and by means of background colors found that the details section is being expanded unnecessarily into the second page. However, like the OP, the details section renders correctly in all of the subsequent rows in the report. Any other ideas?
0
Nathaniel
Top achievements
Rank 1
answered on 16 Mar 2011, 04:59 PM
I've played around with this some more and I note that it only happens when the details section is longer than a page. So if I delete some things and shorten the details section then it works as expected. What's happening is that there are a lot of things on the page that are invisible because there are no data for those items. The details section is being shorted accordingly to accommodate the invisible items, but only starting with the second detail row. On the first detail row the details section is kept at its full longer-than-one-age length, which bleeds into a second page unnecessarily. Due to the page break setting, the third details row begins a page later, which causes a page (page 2) to appear blank. Again, all subsequent details rows and pages appear as expected.
0
Nathaniel
Top achievements
Rank 1
answered on 18 Mar 2011, 06:40 PM
I opened a support ticket about this subject and eventually received the follow answer, which fixes the problem. Hope it helps someone else:

"Currently the containers such as Detail section don't have CanShrink property. However a similar effect can be achieved if you set the DetailSection.Height property to a small value in the report's constructor after the InitializeComponent() as shown in the following code snippet."

public Report1()
{
    InitializeComponent();
    this.detail.Height = Unit.Pixel(10);
}
Tags
General Discussions
Asked by
Karl Wilkens
Top achievements
Rank 1
Answers by
Peter
Telerik team
Nathaniel
Top achievements
Rank 1
Share this question
or