I have an SSRS report to which I am passing a Start Date and End Date parameter but I keep receiving the following error:
Procedure or function 'MyReport' expects parameter '@startDate', which was not supplied.
I have created a parameter in my report and mapped it in my DataSet. I do not understand what I'm missing here. Any ideas? Any help is much appreciated.
SQL
ALTER PROCEDURE [dbo].[MyReport]
@startDate datetime,
@endDate datetime
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
SELECT *
FROM myReportTbl tbl
WHERE tbl.[Updated] >= @startDate
AND tbl.[Updated] <= @endDate
END
Report Code
<DataSet Name="DataSet1">
<Query>
<DataSourceName>Dev</DataSourceName>
<QueryParameters>
<QueryParameter Name="@startDate">
<Value>=Parameters!StartDate.Value</Value>
<rd:UserDefined>true</rd:UserDefined>
</QueryParameter>
<QueryParameter Name="@endDate">
<Value>=Parameters!EndDate.Value</Value>
<rd:UserDefined>true</rd:UserDefined>
</QueryParameter>
</QueryParameters>
<CommandText>MyReport</CommandText>
</Query>