I have a stored procedure that is called from an SSRS report. The stored procedure on its own works fine (for example, code below returns expected results). The report passes in 2 parameters, both DateTime
, but these are seemingly being completely ignored. How can I verify the values being passed into the stored procedure from within the stored procedure?
USE [MyDatabase]
GO
DECLARE @return_value int
EXEC @return_value = [reports].[uspMyReport]
@StartDate = N'3/15/2013',
@EndDate = N'3/16/2013'
SELECT 'Return Value' = @return_value
GO
From with BIDS, within a shared dataset, the sproc is called like so:
EXEC reports.[uspMyReport] @StartDate, @EndDate
Answer: I can see the value that has been passed into the stored procedure like so:
DECLARE @StartDateString VARCHAR(50)
SELECT @StartDateString = CAST(@StartDate AS VARCHAR)
RAISERROR(N'StartDate: %s', 18, 0, @StartDateString)
RETURN