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

Unable to cast object

5 Answers 648 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Clint Singer
Top achievements
Rank 1
Clint Singer asked on 27 Apr 2010, 01:32 AM
Hi,

I just tried to add the Silverlight report viewer to my application but it fails to load the report.  Originally I tried to use the latest build but it failed completely due to a parse error which I believe was due to the fact that I am currently using version 209.3.1314.1030 version of the controls.  I am not yet in a position to upgrade them to the latest build due to some breaking changes.  I then went for an older version of the reporting tools, in this case 3.2.9.1211 in which the control loads correctly but the report doesn't.

The error I get in the report viewer is as follows...

"Error: Unable to cast object of type 'ReportsLibrary.UsageReport' to type 'Telerik.Reporting.IReportDocument'.

I followed the videos on how to integrate the reports but since this is my first attempt I am at a loss as to what to next.

Cheers,
Clint

5 Answers, 1 is accepted

Sort by
0
Thomas Garp
Top achievements
Rank 1
answered on 28 Apr 2010, 09:44 AM
Hey.
I just had the same problem, and then I ran the Telerik report upgrade wizard, which converted all the reports to the same version (you are able to select which version you want them to be). And after that, it all worked.
Regards, Thomas
0
Clint Singer
Top achievements
Rank 1
answered on 28 Apr 2010, 03:37 PM
Interestingly I had done the same thing and it fixed the problem.  At least we know that the fix is consistent.

Thanks for the help.

Cheers,
Clint
0
Macloud
Top achievements
Rank 1
answered on 01 May 2012, 02:53 PM
I also had this same problem and tried the suggested solution of using the Telerik upgrade wizard, but that didn't help.  After scrutinizing all of my code and the telerik documentation, I found that my code was upgraded to Telerik Reporting Q1 2012, but my ReportService.svc file was still referring to Telerik Reporting Q3 2011.  I updated ReportService.svc to use Q1 2012 and everything works fine.
0
Steve
Telerik team
answered on 02 May 2012, 08:14 AM
Hi Macloud,

Thank you for the information, but this file is also upgraded by the Telerik Reporting Upgrade Wizard, so in your case there must have been an error after running it. Did you view the log to share what caused it to fail the upgrade (possibly read-only issue)?

All the best,
Steve
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
Macloud
Top achievements
Rank 1
answered on 02 May 2012, 06:34 PM
Yes, you're correct - the upgrade wizard did update the ReportService.svc file.  This was my error in that I didn't copy the updated .svc file up to where my website resides. 
Tags
General Discussions
Asked by
Clint Singer
Top achievements
Rank 1
Answers by
Thomas Garp
Top achievements
Rank 1
Clint Singer
Top achievements
Rank 1
Macloud
Top achievements
Rank 1
Steve
Telerik team
Share this question
or