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

Cannot locate resource with ReportViewer for WPF

1 Answer 131 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Daniel Woodard
Top achievements
Rank 1
Daniel Woodard asked on 08 Jul 2011, 06:24 PM
Whenever I try and drag and drop the Report Viewer WPF component (on my WPF window), i get the following error:

Initialization of 'Telerik.Windows.Controls.RadButton' threw an exception.
"Cannot locate resource: 'themes/expression/dark/rangecontrol.xaml'."

I am using VS2010 with the Telerik Reporting Q1 2011.  I followed the instructions for adding the report viewer to a WPF application, but have not been able to get past the above error.  Despite referencing all Telerik themes.

Please help.

1 Answer, 1 is accepted

Sort by
0
Daniel Woodard
Top achievements
Rank 1
answered on 08 Jul 2011, 09:09 PM
I solved this.  If you try and embed the ReportViewer inside a frame that uses a defined static style, naturally the ReportViewer will attempt to use the parent styles.  In my case, I only had styles  defined for some of the components and ReportViewer didn't like this.

I just removed the styles on the parent container and all works fine now.
Tags
General Discussions
Asked by
Daniel Woodard
Top achievements
Rank 1
Answers by
Daniel Woodard
Top achievements
Rank 1
Share this question
or