Ucodia
Ucodia

Reputation: 7720

How can I render a report from SSRS 2010 web service in WPF?

I have a connection to SSRS 2010 web service in my application and I can load the whole hierarchy of report folders and report items contained in my server without a problem. I generated the SSRS 2010 service proxy thanks to the WSDL tool, following the guideline on MSDN.

I have looked to the different ways of rendering the report items in WPF and the common way of doing so is to provide a path to a RDLC file as a datasource to the report viewer control. The problem is that when I load this hierarchy in memory, all I have is CatalogItems, and these items does not provide me a path leading to such an object.

I am kind of lost here. How can I proceed to retrieve a usable and displayble object?

Upvotes: 0

Views: 1406

Answers (1)

Ucodia
Ucodia

Reputation: 7720

I finally figured out how to do do that.

I take the report path from the CatalogItem.Path property and then I added a ReportServerUrl property to my ReportingService2010 instance so I can retrieve it later. This is all on the object side.

For the graphics I integrated the Forms ReportViewer in my WPF application with the WindowsFormsHost. To display the remote report in the control I had to change the ReportViewer.ProcessingMode to ProcessingMode.Remote and finally set the ReportViewer.ServerReport.ReportServerUrl and ReportViewer.ServerReport.ReportPath to my report object properties. Then call the ReportViewer.RefreshReport() method to load the report.

Upvotes: 1

Related Questions