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

Fit to Page in viewer and printed report?

1 Answer 461 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Roy Zolnoski
Top achievements
Rank 1
Roy Zolnoski asked on 04 May 2010, 11:16 PM
I have a report with three subreports all in the detail section. I want this report to always fit on one page in both the report viewer and the printed report, sort of like the Excel "Fit to page" option. Is there a way to do that?

We're using VS 2008, C#, Q1 2010 build. We've got a WinForm application with a form that contains the ReportViewer control. We instantiate the form and pass it an instance of an IReportDocument. We have KeepTogether set to true on all three subreports but that doesn't prevent the third subreport from getting pushed to a second page.

1 Answer, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 05 May 2010, 03:48 PM
Hello Roy Zolnoski,

When you display a report in the Windows forms viewer, it uses the Image rendering extension to show the report. As explained in the Design Considerations for Image Rendering help article, it is page oriented format and it is normal for the report to be paged. If a report exceeds the settings specified in the PageSettings properties, it would be paged automatically and this cannot be changed.stopped.

The output of a reports rendered in different formats differs because  medias are quite different. For example HTML/Excel is dedicated to displaying information on screen and the page is infinite by width and height; in contrast PDF supports physical pages and is meant not only for reading on screen but for printing.

According to whether the format supports physical pages, we separate the export formats on two groups: page-oriented (PDF, Image (print preview), print, XPS, RTF) and non-page oriented (HTML/MHTML, Excel, CSV).

For the page-oriented formats the content layout is on horizontal and vertical pages according the the page settings of the report, while for the rest of the formats take into considerations other characteristics of the media like the grid of the Excel worksheet.

By default KeepTogether property is true for all report items and sections. So if a report can fit on a single page it would always try to do so.

All the best,
Steve
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
General Discussions
Asked by
Roy Zolnoski
Top achievements
Rank 1
Answers by
Steve
Telerik team
Share this question
or