I have a stored proc with some date parameters. The report was using parameters I entered via the calendar tool and out of nowhere it is now ignoring the parameters and running the report based on the defaults set in the stored proc. When I pass the parameters directly to the stored proc then the proc uses the parameters. They just don't work in SSRS for soem reason. Below is the code that sets up the date parameters.
DECLARE @startdate DateTime; DECLARE @enddate DateTime; DECLARE @StartDate1 DateTime; DECLARE @EndDate1 DateTime; SET @StartDate1 = '05/28/2013'; SET @EndDate1 = '05/30/2013'; SET @startdate = @StartDate1; SET @enddate = @EndDate1; IF @StartDate1 IS NULL OR @EndDate1 IS NULL OR @EndDate1 <= @StartDate1 BEGIN SET @startdate = DATEADD(dd,((DATEDIFF(dd,-53690,getdate())/7)*7)-7,-53690); SET @enddate = DATEADD(dd,7,@startdate)In SSRS, which is 2008R2, I manually created the parameters as Name = StartDate1 with a data type of Date/Time. Allow Blank Value is greyed out. Allow null value and allow multiple values are both unchecked. This gives me the calendar tool I mentioned above. The other parameter is Name = EndDate1 and everything else the same as the StartDate1 parameter. Why am I having the problem?
Lee Markum