Monday 28 July 2008

SQL Reporting Services Client ...

Few months ago, I had developed a simple windows application in .NET that can execute an SQL server Reporting Services (SSRS) report and export the output as PDF or Excel. The concept behind executing an SSRS report is pretty straight forward, one can find 'n' number of "How-to" tutorials on the web to consume SSRS webservices.

The key is to make use of the SSRS webservices and here is the list of web services that help us:

  1. Add web references to the web services at the urls below:


    • http://<machine running SQL Server 2005>/ReportServer/ReportExecution2005.asmx
    • http://<machine running SQL Server 2005>/ReportServer/ReportService2005.asmx
After you add web references, follow the API document (I can send you a sample, if you think you are breaking your head ;-) ) and execute the reports.

So far, I haven't done anything new,but now let me list down the interesting elements of my SSRS client:
  1. The client lets you define multiple reports, set the param names and values (that the target report expects)
  2. Configure the export format (PDF, Excel)
  3. Merge the outputs of all the reports (if the output format is PDF, then all the output PDFs are merged as one PDF document and if it is Excel, then all the report outputs are added as difference worksheets in a single spreadsheet)
  4. The application supports command-line mode (good especially if you want to schedule the execution)
Here is a sample screenshot of the application:



Happy report generation :-)


6 comments:

petertparker said...

Hi Nice Blog web development services designs custom sites for businesses and non-profit organizations. We can build a site of any size that will reflect the spirit and flavor of your organization. We can rebuild sites that are out-dated or that fail to attract your target audience. We build web sites from anywhere; we work with organizations all over the North America. Best of all, we are not done until you are satisfied.We design customized banners, buttons, and embellishments for your website. We can also implement flash animation, a customized intro page, and other special features. All pages include descriptor tags and keywords for search engine indexing.

Mielaya said...

Kiran,

I am trying to figure out how to export multiple reports in one pdf and/or excel document. It would be very helpful if you could give me couple ideas on how you managed it in your application.

Thank you for the great blog.
Jenya

Kiran banda said...

Hi Mielaya,

I have used an open source library named "PDFSharp for .NET" to merge PDFs into one single document.

For more details, pass me on your mail id and I can mail you some helpful code snippets :-)

Cheers

Mielaya said...

Kiran,

Thank you very much for such quick response.

mielaya at aol dot com

Grace said...

Hi Mielaya, I have a similar problem where i couldn't combine different rdl into one single pdf/excel file when we render the reports. AS you indicate here, we could use PDFSharp for combining PDF files. Any ideas how to combine different reports into one excel file? Thanks.

Kiran banda said...

Hi Mielaya,

Thanks for revisiting my post :)
I couldn't get when you say you want to combine rdls !! The tool that I explained in my post is a stand-alone windows app that invokes SSRS webservices, exports the reports in formats like PDF/EXCEL, combines them as multiple docs/sheets respectively.

Let me know if I have answered your question.

Cheers,
Kiran Banda