Question : Stored Procedure to pass parameter to another SSRS report

Hi Experts,

I have been unemployed since May and I will land this job if I can prove that I can pass parameters from one SSRS report to another with a Stored Procedure.

There are 2 reports, Sales Person Performance and Sales Person Detail.
In the performance table ContactID column I have a navigation property that jumps to the detail report. I pass both of the date parameters there.

I need to figure out how to make an SP that will grab the value of the ContactID that was clicked on and make it available for use as a parameter in the detail report.

Can anyone show me how to create such a procedure and use the value as a parameter in my detail report?

I am pasting the queries for the data sets for both reports below.

Performace Report:
SELECT     TOP (10) SUM(Sales.SalesOrderHeader.TotalDue) AS TotalDue, Person.Contact.FirstName, Person.Contact.LastName, Person.Contact.ContactID
FROM         Sales.SalesOrderHeader INNER JOIN
                      Person.Contact ON Sales.SalesOrderHeader.ContactID = Person.Contact.ContactID INNER JOIN
                      Sales.SalesPerson ON Sales.SalesOrderHeader.SalesPersonID = Sales.SalesPerson.SalesPersonID
WHERE     (Sales.SalesOrderHeader.OrderDate BETWEEN @StartDate AND @EndDate)
GROUP BY Person.Contact.LastName, Person.Contact.FirstName, Person.Contact.ContactID
ORDER BY TotalDue DESC

Detail Report:
SELECT     Sales.SalesOrderHeader.TotalDue, Person.Contact.FirstName, Person.Contact.LastName, Person.Contact.ContactID
FROM         Sales.SalesOrderHeader INNER JOIN
                      Person.Contact ON Sales.SalesOrderHeader.ContactID = Person.Contact.ContactID INNER JOIN
                      Sales.SalesPerson ON Sales.SalesOrderHeader.SalesPersonID = Sales.SalesPerson.SalesPersonID
WHERE     (Sales.SalesOrderHeader.OrderDate BETWEEN @DetailStartDate AND @DetailEndDate)
ORDER BY Person.Contact.ContactID

My 3rd interview with this company is this Thursday 8/26/2010
Any help would be so greatly appreciated!

Thanks

Dan
 

Answer : Stored Procedure to pass parameter to another SSRS report

Random Solutions  
 
programming4us programming4us