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

Excel Unwanted Horizontal PageBreak

3 Answers 157 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Steven
Top achievements
Rank 1
Steven asked on 02 Feb 2013, 09:14 AM
I have a report with a horizontal grouping, simple table with column details and static rows.

The page renders to a single page, but when exporting to Excel, I get a page break before the last column.
Export to PDF and Word are fine and Excel has the same page margins.

Its about 60 pixels off, would this be with an issue of calculating Telerik.Reporting.Drawing.Unit to Excel widths or a different box model calculation from padding?

Telerik Column OpenXML (Excel Column)
0.85in 11.66 = 0.92in

3 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 05 Feb 2013, 03:22 PM
Hi Steven,

This is a known problem with the page header section in the Excel format, which occupies the whole space between the margins, thus in most cases causes additional columns.

To avoid the extra blank pages, you have the following options:
  1. Configure the Excel rendering extension through the Config Section to use the Excel's native page header. To find the necessary device info key name, please check the Device Information Settings documentation article.
  2. Put the content of the page header in the Report Header section. The drawback is that the content will not be repeated on each page of the report while you preview the report in the viewer. Also in Excel the cells will not be frozen on top of the report.
  3. Put the content of the page header in the most outer group header. This way the moved items will be repeated on each page in the viewer (PrintOnEveryPage property should be true). The only inconvenience is that they (again) will not be frozen in Excel.

Regards,
Steve
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 05 Feb 2013, 03:48 PM
So the PageHeader rendered into the top rows as a frozen header is causing the Table columns width to be too wide?

We are seeing additional columns generated when the Header Textbox's do not align with the body content, but why would it cause the width to be calculated wrong.

Is this a different between the calculation of units.

Telerik DPI calculated pixels => tulips

Telerik 0.85in = Excel .92in (because of the Frozen Header?)


0
Steve
Telerik team
answered on 08 Feb 2013, 12:58 PM
Hello Steven,

Excel is not a physical page document format and it calculates pages based on logical page layout. It would render two pages even if you do not have any data in a report but have page sections enabled. We're not measuring the size of columns wrong, if that is what you imply and you can check that by placing a single TextBox in a report and see how that turns out in the Excel file. There might be slight difference due to Excel rounding the values, but it definitely should not be that much as you have posted.

Please use the provided workarounds we offered in our previous post.

Greetings,
Steve
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!

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