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?
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?
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.
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/