Use of Stored Procedures in SQL Reporting Services 2000
I am VERY new to SRS 2000 and VS 2003.
I want to call a stored procedure from within a query's temp result set.
I select data from a db, put it into a inline #t table, then I want to use an entry in the table as a parameter into the stored procedure to put the result of the SP into a field in the #t table called num_days
Only 1 parameter is coded into the Stored Procedure and it is @package_id
no where can I find an example of how to call a stored procedure from within SQL Reporting Services - everything says "use a stored procedure" or call it. But not a code example anywhere of how to actually do it within Report Services.
Using the SP in another dataset is okay - but I would still need an example of how to pass the variable to the other DS and return it to the existing DS to update the table.
here is my select:
- - - - -
SELECT p.package_id,
package_type_cd,
min(package_event_id) min_package_event_id,
min_valid_package_event_nm = space(30),
min_package_status_cd = space(6),
min_package_event_dt = getdate(),
max(package_event_id) max_package_event_id,
max_valid_package_event_nm = space(30),
max_package_event_dt = getdate(),
max_package_status_cd = space(6),
num_days = 0,
package_type = space(6)
INTO #t
FROM package p, package_event e
WHERE p.package_id = e.package_id and package_type_cd = 'fa'
GROUP BY p.package_id, package_type_cd
ORDER BY p.package_id
- - -
here is where I want to use the SP to get the days value and put into the num_days field.
TIA
you can e-mail directly to app @ bpa.gov.
Tom

