Reporting is the heart of most business applications. And SQL Server Reporting Service (SSRS) is a preferred choice while MSSQL Server is the database back-end. Apart from ready to use services, SSRS provides different and useful scalability and extensibility options.
On the other end, lately, MS Silverlight has generated positive heat amongst varied business applications.
So you got the point. I’m talking about the marriage between SSRS and Sliverlight.
It started with challenges as the whole concept was an unknown devil which we were able to tame in the end.
The problem was simple – Microsoft doesn’t have any SSRS report-viewers for Silverlight – but its impact was not so. Initially, it was apparent that we cannot use SSRS with Silverlight.
So, I Googled (and then Bingged also – both the technologies are from Microsoft
) to find out the following two possibilities out of my one hour of investment:
- Use Third Party Report Viewer Controls
- Use ASP.NET application and invoke it from Silverlight application
Each option has its own distinctions. Here are those:
- Third Party controls: We can use third party report viewers which support SSRS reports. Right now there is only one such software provider Perpetuum Software is available. They provide SSRS report viewer for Silverlight which is also Silverlight 4 ready. There are other report viewers provided by other major component providers like Telerik however they do not support SSRS reports at present. Instead, they support their own reporting ways from within Silverlight application.
- ASP.NET Application: In this approach, we have to create an ASP.NET web application for hosting SSRS reports. The web application will use default report viewer control. To integrate this web application into the Silverlight application there are two possible options as below:
- Using Html Viewer: We can use HtmlViewer control to view reports hosted as an ASP.NET web application. Though, Silverlight 3 does not have in-built html viewer control, there are third party controls available like one from Telerik. The good news is that Silverlight 4 does have in-built html viewer control.
- Using JavaScript: We can use client side JavaScript functions to open new window or IFRAME from within Silverlight application which will show reports hosted as an ASP.NET web application.
I am sure Microsoft will come up with a better solution to this problem in the coming days. Until that any of the above options can be used. I used option #2 – ASP.NET application – considering the client needs of flexibility and it worked well.
