jump to navigation

Run and Export SSRS Reports from SSIS (SQL Server 2005) May 19, 2009

Posted by Zoran Ivić in SSIS.
trackback

Few days before I finished SSIS package which produces lot of Excel sheets for regular use in company where I work. I am not so sure how much is useful to have sheet with 20 or 30 thousands rows (yes, that’s for regular work), but I made a tool and Server takes care about populating Excels.

So, customers are almost happy, but… as an addition to excels I had to made Summaries for every excel. I decide to made SSRS report with one parameter and run it trough SSIS and export it like PDF file in same folder where Excels are. Unfortunately, wasn’t so easy to find simple solution and that is reason for this post…

Picture of simplified solution:

ReportExport1

Execute SQL Task – collection of “Parameters” from database

Foreach Loop Container – Loop execution of report for every parameter from Sql Task (trough AdoEnumerator) saved in string variable

Script Task – render report in pdf and save it on local disk

Script task needs Credentials for  HttpWebRequest class. I’m using default, but it can be changed in SSIS configuration file.

Example package can be downloaded here ReportExport.zip – delete .doc extension (SSIS and SSRS project with sample report).

Comments»

1. Dalamar - April 15, 2010

Thank, work very well.

2. Unknown - April 26, 2010

Thanks man! It\’s a really cool solution for client who bought SQL Server STANDARD edition instead of Enterprize,

3. Kris - January 18, 2011

Thank a lot for sharing..

4. krishna - August 5, 2011

I am not able to open the downloaded file..

zoranivic - September 22, 2011

Please delete .doc extension.

5. Leif Hurst - September 21, 2011

This is genius… been trying to figure this one out for a while now!

zoranivic - September 22, 2011

I’m glad I could help.

6. zezaidali - November 12, 2011

can this same thing be done with preinter as a delivery extension. I have been tryint to deploy the printer delivery extension sample for two days and my data driven subscription is not able to find the printer on the server and prints as .xps file on disk.

I am thinking how can i modify the script to print the pdf generated to a specific netwrk printer .

Please suggest.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.