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

ComVisible Problem

6 Answers 256 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Darren
Top achievements
Rank 1
Darren asked on 04 Aug 2009, 04:55 PM
Hi,

I'm trying to embed a report on an ASPX page.  When I try and set the Report property of the Report Viewer I get the following error:

This type has a ComVisible(false) parent in its hierarchy, therefore QueryInterface calls for IDispatch or class interfaces are disallowed.

I checked my assembly settings and ComVisible was false even though in the property page it was checked.  I change Assembly.cs to set the ComVisible property to true.  I still get the error though.

Thanks,
Darren



6 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 05 Aug 2009, 08:36 AM
Hi Darren ,

You're the first person to report such an error and we've not been able to replicate it locally. Our suggestion is to close all VS instances, open the reporting app again, rebuilt and see of the error persists. Also, there is an easy way to set the report in code behind of your aspx page e.g. Page_Load:

Telerik.Reporting.Report rpt = new MyReport();
ReportViewer1.Report = rpt;

Regards,
Steve
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Darren
Top achievements
Rank 1
answered on 05 Aug 2009, 02:22 PM
Hi Steve,

That actually worked!  I got data too!  I'm getting a blank report when I preview it from VS 2008 but that's another thread.

I tried cleaning the solution.  I tried cleaning the solution, rebooting and rebuilding...  So far no joy but at least I can move on.

Thanks,
Darren
0
Accepted
Steve
Telerik team
answered on 05 Aug 2009, 03:33 PM
Hi Darren ,

Are you by any chance using the Reports directly in a web site i.e. they're in its App_Code folder? If so, then this is expected and design time previews would not work. Please follow our best practices and create a separate class library containing the reports, and then reference this library in your actual project.

Regards,
Steve
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Darren
Top achievements
Rank 1
answered on 05 Aug 2009, 04:30 PM
Hi Steve,

That fixed my blank page problem and the ComVisible problem!  Thank you very much!

Thanks,
Darren
0
Jeff Berry
Top achievements
Rank 2
answered on 21 Oct 2011, 04:13 PM
This is happening consistently to me using 2011 Q2 Telerik reporting.  I can set the Report property from the codebehind but I cannot select it the Properties window just as the OP described.
0
Steve
Telerik team
answered on 26 Oct 2011, 09:04 AM
Hello Jeff,

If you are having the same problem, did you try the suggestions from previous post that clearly helped the user? If something differs on your end, please elaborate on your scenario.

Greetings,
Steve
the Telerik team

Q2’11 SP1 of Telerik Reporting is available for download (see what's new). Get it today.

Tags
General Discussions
Asked by
Darren
Top achievements
Rank 1
Answers by
Steve
Telerik team
Darren
Top achievements
Rank 1
Jeff Berry
Top achievements
Rank 2
Share this question
or