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

customize WPF Reportviewer

1 Answer 148 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Dieter
Top achievements
Rank 1
Dieter asked on 15 May 2015, 12:45 PM

Hi there

I want to add a combobox into the Reportviewer Toolbar so that i can change the size (A0,A1,A2 ....) from the Report which is displayed.

Until now i have added the following into the Telerik.ReportViewer.Wpf.xaml

<telerikInput:RadComboBox x:Name="PapersizeCb" 
                          ItemsSource="{Binding PaperSizeList}" 
                          SelectedItem="{Binding SelectedPaperSize}">
</telerikInput:RadComboBox>

My Problem is that i don't know how i can modify the Viewmodel of the Reportviewer to bind my Properties.

 

The version of Telerik I'm using is Q3 2014 SP1.

 Regards

 

1 Answer, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 20 May 2015, 09:50 AM
Hello Dieter,

As of Q1 2014 Telerik WPF ReportViewer uses only implicit styles, where its template is exported in a XAML file per theme (C:\Program Files (x86)\Telerik\Reporting Q1 2015\Wpf\Themes). Also the ReportViewerModel is only for internal usage, where to work with the viewer you can rely on the exposed API.

Instead you can add a custom control overriding the default control, which is bound to the properties of the viewer's ReportViewerModel. In the overridden methods you can interpret the received values as required e.g. change the report's PageSettings properties and update the viewer's ReportSource.

Regards,
Stef
Telerik
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 Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Dieter
Top achievements
Rank 1
Answers by
Stef
Telerik team
Share this question
or