9 Answers, 1 is accepted
You can switch between Interactive view and Print Preview, using the toggle button right next to the refresh button in the viewer toolbar. If you wish to start with Print Preview as default view, set the ViewMode Property of the viewer to PrintPreview.
Greetings,Steve
the Telerik team
Q2’11 SP1 of Telerik Reporting is available for download (see what's new). Get it today.
Private
myviewer
As
New
Telerik.ReportViewer.Wpf.ReportViewer
and i would expect this to work
myviewer.ViewMode = ViewMode.PrintPreview
but the myviewer.ViewMode is not a member of Wpf.ReportViewer. The ViewMode.PrintPreview is recognized but the property on the viewer itself doesn't seem to be there. thanks.
Indeed currently setting PrintPreview as default view is a bit tricky and we plan to expose a ViewMode property for both Silverlight and WPF viewer in the upcoming service pack. For the time being you would have to inherit from our viewer, get its model and set the ViewMode property:
in MainPage.xaml:
<
local:MyReportViewer
Grid.Row
=
"1"
x:Name
=
"ReportViewer1"
Width
=
"1000"
telerikControls:StyleManager.Theme
=
"{Binding SelectedItem, ElementName=ThemeSelector}"
ReportServiceUri
=
"../ReportService.svc"
Report
=
"Telerik.Reporting.Examples.CSharp.ProductTagReport, CSharp.ReportLibrary"
/>
and in MainPage.xaml.cs:
public
class
MyReportViewer : ReportViewer
{
public
override
void
OnApplyTemplate()
{
var report =
this
.Report;
this
.Report =
""
;
base
.OnApplyTemplate();
var layoutRoot = (FrameworkElement)VisualTreeHelper.GetChild(
this
, 0);
var rvm = (ReportViewerModel)layoutRoot.DataContext;
rvm.ViewMode = ViewMode.PrintPreview;
this
.Report = report;
}
}
Regards,
Steve
the Telerik team
Q3’11 of Telerik Reporting is available for download. Register for the What's New in Data Tools webinar to see what's new and get a chance to WIN A FREE LICENSE!
Thanks but no thanks, will be staying with the previous release until all this mess is sorted out.
We agree that we could have provided an easier way to turn it off for the Silverlight/WPF viewers and we're currently working on addressing this omission. The fix should be part of the upcoming service pack in about a month.
Kind regards,
Steve
the Telerik team
Q3’11 of Telerik Reporting is available for download. Register for the What's New in Data Tools webinar to see what's new and get a chance to WIN A FREE LICENSE!
the workaround you've prodivded works for showing in old style?
Thanks
Paolo
The interactive view does not mean that the whole report would be rendered as a single huge page. This is rather an exception than a rule and can happen if a single section (or data items such as SubReport or Table) grows more than the height defined in the page settings. As you can see from the online examples, our demo reports are still rendered in several pages as in the "old style" you refer to.
Regards,
Steve
the Telerik team
Q3’11 of Telerik Reporting is available for download. Register for the What's New in Data Tools webinar to see what's new and get a chance to WIN A FREE LICENSE!