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

Extra page when group footer page break after and multiple groups

4 Answers 585 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Mike
Top achievements
Rank 1
Mike asked on 03 Jul 2014, 09:08 PM
Just  started using Telerik reporting and noticed an odd behavior that seems specific to the report created in the Visual Studio 2013 WYSIWIG and does not occur when using a report generated in the Standing alone report designer.  I am working with the version from Q2 2014.

I first build this simple report in the stand alone report designer.  Then duplicated it using the designer and class use in the VS 2013.  This is a banded report and has 3 groups, 2 of which are bound to something and one being used to display the row headings on every page.  The first two groups have the group footer set to PageBreak After.

In my testing my data source was a stored procedure that returned data that should result in 2 pages.  In the stand alone version of the report both the preview of the report as well as when creating a pdf directly from code using the ReportProcessor.RenderReport method.  In the VS2013 WYSIWIG tool when I rebuilt the report and bound it to the stored procedure it was resulting in 4 pages.  Where page one at the data that matched the stand alone report.  Page 2 had the data from the page header, page footer and just the group1 footer, then page 3 had the same data as page 2 of the stand alone report.  And page 4 again had the page header, page footer and just the group 1 footer.

In the VS2013 WYSIWIG  this problem was fixed by setting the group footers to not be visible.  Which in this simple instance is fine, but I can see future needs that this will not  work for.  Is this a known issue?

4 Answers, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 07 Jul 2014, 11:07 AM
Hello Mike,

Please test to import the TRDX file in Visual Studio and test running the preview - Interactive and Print previews. Then test to import your report from VS into the Standalone Designer and run Preview again.

Importing the currently existing reports will allow you to compare the definitions and check what is causing the additional pages. The usual causes of blank pages in the report's physical format are described in the Problem: Telerik Reporting renders blank pages KB article.

If both definitions are the same and the issue is still reproducible, please post the generated XML or send us the report files in a support ticket.
 
Regards,
Stef
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Mike
Top achievements
Rank 1
answered on 07 Jul 2014, 01:39 PM
Further digging and I was able to duplicate the extra page in the stand alone viewer.  I had inadvertently set the last of the 3 group footers to not be visible.  

So I don't think my problem is one covered in the FAQ.  I believe it may be the way the groups are setup.  I have 3 groups.  One group is not bound and is used for the column headings.  The next group is bound to a character field.  this field is in the group header, and the group footer is empty.  The group footer is set to PageBreak After.  the last group is bound to a character field.  This field is in the group header and the group footer is empty.  The group footer is set to PageBreak After.

the extra page only shows up when the last group footer has visible = true.  The second to the last group setting has no impact.  I'll send a support ticket.
0
Mike
Top achievements
Rank 1
answered on 07 Jul 2014, 02:26 PM
Solved.  As noted in my previous response I was simply being unobservant of what I had done with the standing alone report designer.  When I made the last group footer visible I then could duplicate the problem in all environments.

With that out of the way I did further investigation.  It turns out that I believe I was expecting a intuitive behavior from the footer groups.  In particularly I have 2 groups that are character values.  both footers for these groups are set to have PageBreak After.  In my test data set I had 4 rows with the character values grouping changing at the same time.  For example.
Group 1, Group 2
GroupOneText, GroupTwoText.
GroupOneText, GroupTwoText
GroupOneText2, GroupTwoText2.
GroupOneText2, GroupTwoText2.

So when the data was displayed it would show the first two rows, then the first group footer would display nothing (it is blank) and it would hit it's page break after, adding a page.  But on that page it would hit the 2nd group which would display nothing (it is blank) and would hit it's page break after.  Thus creating my extra page.
What I wanted was a single page break on any of the groups changing.  So to get that I added a new group.  This group uses a data grouping expression that contains any group I want to break on and this group is set to be the most outward group.  I set that group to PageBreak After and set all other groups to not break on a page.

A little more digging and I also found two other ways to do this.
#1 - Use Page Break Before on the Group headings but then you also need to set PrintOnEveryPage to True or you get extra blank pages.
#2 - Usage  Page Break After on the group footers but also set PrintOnEveryPage to True to eliminate the blank pages.

0
Accepted
Stef
Telerik team
answered on 08 Jul 2014, 07:25 AM
Hello Mike,

I am glad to hear you found a solution.
Just in case it is interesting to you, check the following KB article: Conditional Page Breaks.

Regards,
Stef
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
General Discussions
Asked by
Mike
Top achievements
Rank 1
Answers by
Stef
Telerik team
Mike
Top achievements
Rank 1
Share this question
or