ComVisible Problem

7 posts, 1 answers
  1. Darren
    Darren  avatar
    57 posts
    Member since:
    May 2009

    Posted 04 Aug 2009 Link to this post

    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



  2. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 05 Aug 2009 Link to this post

    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.
  3. DevCraft banner
  4. Darren
    Darren  avatar
    57 posts
    Member since:
    May 2009

    Posted 05 Aug 2009 Link to this post

    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
  5. Answer
    Steve
    Admin
    Steve avatar
    10941 posts

    Posted 05 Aug 2009 Link to this post

    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.
  6. Darren
    Darren  avatar
    57 posts
    Member since:
    May 2009

    Posted 05 Aug 2009 Link to this post

    Hi Steve,

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

    Thanks,
    Darren
  7. Jeff Berry
    Jeff Berry avatar
    13 posts
    Member since:
    Jun 2009

    Posted 21 Oct 2011 Link to this post

    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.
  8. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 26 Oct 2011 Link to this post

    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.

Back to Top
DevCraft banner