Launch SQL Reporting Service report directly to MS Excel
In my office, we often use Microsoft SQL Server Reporting Service to produce any forms or report to within our system to support our office business. The same thing when we need to export some data into Excel or PDF, my team normally would setup a report base on specific query and deploy it into a SQL Reporting Service Report, publish this report to user and so on. Problem is, for some reason, our user want the output directly goes to MS Excel, because they loveeeee soooo much with this spreadsheet. So, it is my team task to generate report and instead make this show on report viewer it should goes directly to MS Excel.
After some page of SQL Server Manual, I finally found that there is a simple query string parm that we could pass into SQL Server Reporting Service URI and it will define how report would be produce. The query string parm is rs:format=Excel|PDF|HTML
So if we want to generate a report, and normally we will assign user to this kind of URI http://servername/reportserver?reportname&rs:Command=Render, we just need to add magical rs:Format parameter to that URI so it should looks like http://servername/reportserver?reportname&rs:Command=Render&rs:Format=Excel, and all are set to have a report launch directly to MS Excel.
Is not that difficult isn’t ?
Related article(s)
If you think this post is interesting, maybe you would consider to subscribe to my feed by click here or keep update with my newest post via email













Leave your response!