Error when adding ReportViewer on Silverlight UserControl

3 posts, 0 answers
  1. Daniel Plomp
    Daniel Plomp avatar
    130 posts
    Member since:
    Feb 2004

    Posted 25 Jul 2012 Link to this post

    Hi telerik,

    I'm getting the following error when adding the ReportViewer control to a Silverlight Usercontrol. This control lives inside a Silverlight Class Library. I've added the reference to Telerik.ReportViewer.Silverlight.

    Am I forgetting something?

    Error HRESULT E_FAIL has been returned from a call to a COM component.
       at MS.Internal.XcpImports.MethodEx(IntPtr ptr, String name, CValue[] cvData)
       at MS.Internal.XcpImports.MethodPack(IntPtr objectPtr, String methodName, Object[] rawData)
       at MS.Internal.XcpImports.Collection_Add[T](PresentationFrameworkCollection`1 collection, Object value)
       at System.Windows.PresentationFrameworkCollection`1.AddImpl(Object value)
       at System.Windows.PresentationFrameworkCollection`1.System.Collections.IList.Add(Object value)
       at Microsoft.Expression.DesignModel.InstanceBuilders.ClrObjectInstanceBuilder.InstantiateChildren(IInstanceBuilderContext context, ViewNode viewNode, DocumentCompositeNode compositeNode, Boolean isNewInstance)

    Regards,
    Daniel
  2. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 25 Jul 2012 Link to this post

    Hello,

    You need to add more references as the Silverlight viewer uses RadControls for Silverlight and some Silverlight controls:
    • Telerik.ReportViewer.Silverlight.dll
    • System.Windows.Controls.dll
    • Telerik.Windows.Controls.dll
    • Telerik.Windows.Controls.Input.dll
    • Telerik.Windows.Controls.Navigation.dll
    This information is available in the How to: Add report viewer to a Silverlight application help article.

    Regards,
    Steve
    the Telerik team

    BLOGGERS WANTED! Write a review about Telerik Reporting or the new Report Designer, post it on your blog and get a complimentary license for Telerik Reporting. We’ll even promote your blog and help bring you a few fresh readers. Yes, it’s that simple. And it’s free. Get started today >

  3. DevCraft banner
  4. Daniel Plomp
    Daniel Plomp avatar
    130 posts
    Member since:
    Feb 2004

    Posted 25 Jul 2012 Link to this post

    Ah ok. Sorry. I forgot to also add the other needed assemblies that the ReportViewer needs. I just thought that they would be added automatically.

    Regards,
    Daniel

    EDIT: @Steve: Thanks ;)
Back to Top