views:

28

answers:

2

I have a stored proc that basically is used for logging reports that were executed with their parameters. I'd like to run this stored proc on every execution of the report?

Do I do this through the report code window?

A: 

If the report retrieves the data by already calling a stored procedure, what you should do is have this new stored procedure that you require inside the other one.

Otherwise, yes, on the report code window is the best 2nd choice, IMO.

Eton B.
changing the stored procedure will require significant DBA/QA effort here to migrate a change. Do you have any info on the code window approach?
itchi
I don't quite have a lot of time on my hands at the moment, but perhaps this link will assist you. I'll get back to you later on. http://social.msdn.microsoft.com/Forums/en-US/sqlreportingservices/thread/22b99cff-7201-4fe5-8cfd-701475f61e50/
Eton B.
+1  A: 

Have you looked at the information held in the Reporting Services database already? I think report executions and parameters should be recorded though maybe not in a friendly format.

The following links are for SQL2005 I guess that it ought to be possible to get this info out of SQL2008 as well.

SSIS approach to data warehouse from ExecutionLog table to more usable format.

http://msdn.microsoft.com/en-us/library/aa964131%28SQL.90%29.aspx

TSQL Approach

http://www.sqlservercentral.com/scripts/RSExecutionLog/66858/

Martin Smith