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

WPF ReportViewer Not working

3 Answers 321 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Inderpreet
Top achievements
Rank 1
Inderpreet asked on 02 Jun 2011, 09:56 AM
Hi
I am having problems in displaying the ReportViewer in WPF. I have followed the sample code but when I try the following steps, the app breaks and throws exceptions.
Steps to reproduce.
1)I added 3 projects to a solution. One was for reports, the other two I picked up from the sample, WpfDemo and Telerik.ReportLibrary.
2)When I ran the Wpf demo it worked fine, and it showed the telerik default report which was in sample.
3)Now I gave ref to my report project in wpf demo and accessed the report from my library.
4)The report was open but in the reportviewer it showed that conn string could not find, because in wpfdemo, the conn string is missing.
5)I added the conn string, and I re run the wpf demo proj. It gave this error:
"'The invocation of the constructor on type 'Telerik.ReportViewer.Wpf.ReportViewer' that matches the specified binding constraints threw an exception.' Line number '42' and line position '14'."
6)Now if I go back to the report from telerik sample and set it using the report property of ReportViewer, the error still persists. It statys dere no matter what I do.

I have uploaded a sample solution which contains the problem.

The download  link for the solution is :
http://uploading.com/files/de1md62e/TelerikReporting.zip/

A quick response is highly appreciated.

Thanks
Inder Gujral

3 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 02 Jun 2011, 05:36 PM
Hi Inderpreet,

I have examined your solution and found two problems. First you have changed the .NET framework version to 4.0 but you haven't referenced the WPF Rad Controls assemblies for .NET 4.0. Additionally in the app.config you have two nested configuration sections.

I have attached an updated and working version of your solution.

Greetings,
Peter
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
0
Inderpreet
Top achievements
Rank 1
answered on 03 Jun 2011, 08:17 PM
Hi,

I am still not sure. The solution attached, contains a new project for v 3.5. But if I go to reportDemo project which is in 4.0 , I can replicate the same error.
May b I don't have the dll for 4.0 but how to check it?

I downloaded the setup file :Telerik_Reporting_5_0_11_603_TRIAL.msi.

Then I referenced the files located in C:\Program Files\Telerik\Reporting Q1 2011\Bin.

In this folder, there is no distinction of the Framework version, so how to use the DLL for v4.0 or how can one be sure of which version it is??

Can you please send me a link  from where can I download it ?

Also, I have rad controls for FW v 4.0 only. I had downloaded this file for rad controls for wpf --> WPF 4 - Manual installation which is of 94 MB.

Looking forward to your reply.

Thanks
Inderpreet
0
Peter
Telerik team
answered on 06 Jun 2011, 04:39 PM
Hi Inderpreet,

The last two digits in the WPF Rad controls assemblies version indicate the targeted .NET. You can get the WPF Rad Controls assemblies for .NET 4.0 directly from the following link.

Generally the Rad controls assemblies that come with Telerik Reporting demos are included only to demonstrate the WPF Report Viewer. This is why we don't include Rad controls assemblies for .NET 4.0.

Check out the How to: Add report viewer to a WPF application that elaborates on the required WPF Rad controls assemblies and the necessary bindings when different version of the WPF Rad controls assemblies is used.

Greetings,
Peter
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
Tags
General Discussions
Asked by
Inderpreet
Top achievements
Rank 1
Answers by
Peter
Telerik team
Inderpreet
Top achievements
Rank 1
Share this question
or