I have a report in SSRS 2016 that contains one SP which has a date field called startdate. I'd like to create a parameter where the user can select between two ranges: startdate >='2017'or startdate < '2017'. This seems like it should be simple, but I can't see to find an easy way to do this.
I've tried to create a parameter in SSRS where I chose "Specify Values" and manually added these values but I get an error that the "expression references the parameter "startdate" which does not exist in the Parameters collection.
I'm sure I can create this by creating a stored procedure with these dates, but that seems like more work than is needed.
Does anyone know of a better way to do this?
WHERE startdate >= '20170101' AND startdate < '20170101'
would return no results, as something cannot be greater or equal to a value while being less than the same value. – LarnuDtStart
andDtEnd
. Then, in your where clause, useAND StartDate >= @DtStart AND StartDate < @dtEnd
. – Larnu