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

DOCX Header/Footer causes blank pages

2 Answers 79 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Steven
Top achievements
Rank 1
Steven asked on 08 Feb 2013, 07:29 PM
When I have a page header and a page footer and exporting to word, there is a page break after the footer resulting in a every other page being blank.

I have narrowed it down to the padding generated at the bottom of a section.
From the screen capture
Green = Details Section BGColor
Orange = Table BGColor

In the Report Viewer you can see the green from the bottom of the details section because the table was split to fit on each page.

Within Word, you can see that the green padding rows does not fit and Word pushes it to the next page. causing the blank page which is really a pad row with PageBreakAfter.

Also, the DOCX rendering extensions is splitting the content into an outer page layout table

[ row ] => page1 table (orange)
[ row ] => padding row (green)
[ row ] => page2 table (orange)
[ row ] => padding row (green)


Each page acts independent of each other, Page size, margins, header and footer as if they were process separately and stitched together.

This is apparent when you change the page size within word to legal and all that is accomplished is extra padding at the bottom of that single page.

Split tables also eliminates the ability to select an entire column.

RTF processes a single document correctly allowing Word to generate its own page breaks with a single page header/footer.

Is there a way to configure Telerik to generate a continuous page rather then the individul ones for DOCX export?




Thanks
Steve




2 Answers, 1 is accepted

Sort by
0
IvanY
Telerik team
answered on 13 Feb 2013, 01:03 PM
Hi Steven,

As per the Pagination section in the Design Considerations for Word Rendering help article, the reporting engine paginates the document once trying to preserve closely the original layout and paging, however when the exported document is opened in Word, Word repaginates it again. This is what causes the inconsistency you observe.

Please note that you can get rid of your issue if you remove that extra space between your table and the bottom of the detail. You can also make the footers/headers shorter. Only small reduction of height should be enough since in general both pages (PDF and Word) should have the same page settings.

If you are not able to get rid of the issue and since it has some details that we are not aware of it will be best if you are able to open a support ticket and send us a runnable sample that exhibits the problem so that we are able to reproduce it at our end - this will helps us identify the culprit faster and advise you more accordingly.

All the best,
IvanY
the Telerik team

HAPPY WITH REPORTING? Do you feel that it is fantastic? Or easy to use? Or better than Crystal Reports? Tell the world, and help fellow developers! Write a short review about Telerik Reporting and Telerik Report Designer in Visual Studio Gallery today!

0
Steven
Top achievements
Rank 1
answered on 19 Feb 2013, 08:37 PM
Thanks for the suggestions.

It was neither the header or the footer.
The reason for the page break is that an item on the page exceeded the page width.

Page = 7.5
Table = 7.512123123131222

Since the Properties panel only shows "7.5" it wasn't apparent that it was actually bigger then the section.  It rendered fine in the ReportViewer and resulted in MSWord generated pagebreak when opening it in word.


I created a Function to AutoShrink the textbox based on its content to ensure that our large numeric values do not wrap, and this is when I noticed that the Properties window was showing the rounded value.



Thanks again for the help in the right direction.
Tags
General Discussions
Asked by
Steven
Top achievements
Rank 1
Answers by
IvanY
Telerik team
Steven
Top achievements
Rank 1
Share this question
or