I'm using the Model-View-ViewModel pattern in a WPF project and I have the new WPF ReportViewer control in a UserControl. I want to databind the Report property to a property of the underlying VIewModel:
However, the report does not display - it just says "No Report" in the ReportViewer. I fired up Snoop and noticed that the DataContext does not appear to inherit from the UserControl. It's set to Telerik.ReportViewer.ReportViewerModel. Therefore, my binding is presumably looking for a Report property on this object, not the DataContext of the UserControl that hosts the ReportViewer. Is this possible? When the Report property gets set in my VM I'm raising a property changed event to update the UI.
Thanks,
Dave
<telerik:ReportViewer Report="{Binding Report}"
Grid.Column="1"/>
However, the report does not display - it just says "No Report" in the ReportViewer. I fired up Snoop and noticed that the DataContext does not appear to inherit from the UserControl. It's set to Telerik.ReportViewer.ReportViewerModel. Therefore, my binding is presumably looking for a Report property on this object, not the DataContext of the UserControl that hosts the ReportViewer. Is this possible? When the Report property gets set in my VM I'm raising a property changed event to update the UI.
Thanks,
Dave