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

Error when adding ReportViewer on Silverlight UserControl

2 Answers 85 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Daniel Plomp
Top achievements
Rank 2
Daniel Plomp asked on 25 Jul 2012, 11:14 AM
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 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 25 Jul 2012, 11:18 AM
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 >

0
Daniel Plomp
Top achievements
Rank 2
answered on 25 Jul 2012, 11:19 AM
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 ;)
Tags
General Discussions
Asked by
Daniel Plomp
Top achievements
Rank 2
Answers by
Steve
Telerik team
Daniel Plomp
Top achievements
Rank 2
Share this question
or