question

Jason Crider avatar image
Jason Crider asked

Calling an SSRS Report during/after SSIS package

I just want to make sure that I'm looking at doing this the best way.

Upon a certain condition in an SSIS package, we'll need a report from SSRS to run.

From my research, it seems the easiest way is to create the subscription on the report for a previous date to get the SQL Agent Job and then call that. I don't like that it creates a GUID for the name of the Job and if anyone knows a way around that then groovy.

I'm not keen on doing a script task within the SSIS package.

Does anyone know of other options or ways they've done similar things?

ssisssrs
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Pavel Pawlowski avatar image
Pavel Pawlowski answered

Hi, I think, there 2 basic possibilities.

  1. Possibility you have described by creating a subscription for this pupose.. For the subscription is automatically create a job. You can even disable the job in the Agent. If you take a look on the step of the created job, then it only calls exec ReportServer.dbo.AddEvent. So you can simply exec the AddEvent to notify the reporting services to render the report when you need.

  2. Completly handle the report printing form SSIS package inside the Script Task. This will require a little bit programming, but it will allow you even print the report dirrectly on a printer of your choice, pass dirrectly whatever parameters you want. Also you can prepare your own assembly for this purposes and then in the script task call only a few methods of particular class in your assembly.

In the second option you can have a complete control over what you want to do with your report.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

dave ballantyne avatar image
dave ballantyne answered

I know you say you are not keen on doing a script task , but it does give you a lot more control. Check out my blog here for a CLR routine that should be easily adapted to a script.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.