New to Telerik Reporting? Download free 30-day trial

Using the WPF Report Viewer in an MVVM scenario


Product Progress® Telerik® Reporting
Report Viewer WPF


Only dependency properties of the WPF Report Viewer control, designed for the WPF technology, can be bound to properties of a model. A model can have a ReportSource property bound to the viewer's ReportSource.


  • Consider the following example of a model:
class ViewModel : INotifyPropertyChanged
    private int testCounter = 0;
    public event PropertyChangedEventHandler PropertyChanged;
    Telerik.Reporting.ReportSource _myReportSource;
    public Telerik.Reporting.ReportSource MyReportSource
        get { return this._myReportSource; }
            if (this._myReportSource != value)
                this._myReportSource = value;
                if (null != this.PropertyChanged)
                    this.PropertyChanged(this, new PropertyChangedEventArgs("MyReportSource"));

    public ViewModel()
        this.MyReportSource = null;// new InstanceReportSource { ReportDocument = null };
        _thisCommand = new Telerik.Windows.Controls.DelegateCommand(x => ChangeReport());
    ICommand _thisCommand;
    public ICommand ThisCommand
            return _thisCommand;
    public void ChangeReport()
        if (testCounter % 2 == 1)
            this.MyReportSource = new InstanceReportSource { ReportDocument = new Report1() };
            this.MyReportSource = new InstanceReportSource { ReportDocument = new Report2() };
  • The above model can be related to the WPF ReportViewer as follows:
    <vm:ViewModel />
        <RowDefinition Height="50" />
        <RowDefinition Height="*" />
    <Button x:Name="ChangeReportButton" Grid.Row="0" Height="30" Width="100" Command="{Binding ThisCommand}" Content="Change Report"  >
    <tr:ReportViewer Grid.Row="1" x:Name="ReportViewer1" HorizontalAlignment="Stretch" ReportSource="{Binding MyReportSource}" >


Reports have a general purpose and can be reused in different types of projects. Reports do not have dependency properties. If you need to change the data in a report, on trigger the change event of other control you can update data items' DataSource properties in code. Then update the model's ReportSource in order to refresh the viewer. 

See Also

ReportSource Class

In this article