开发者

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 objec开发者_JS百科t.

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


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜