1
votes

I am new to SSRS.

I have a dataset that pulls in values from a table and displays them in a report. One of these columns in the dataset is the "Date_Recieved" column.

I want to add a "start" and an "end" [calendar date selector] that will filter the rows displayed on the report if they fall between the "Start Date" or "End Date".

In other words I want to filter the rows displayed in the report based on whether the value they contain for the "Date_Recieved" column falls between the start/end date that the user has selected.

1

1 Answers

3
votes

How is the dataset being populated? Raw SQL or a View or a Stored Procedure? as this will change how the solution will be?

If you are using a Stored Procedure. You will need to setup two parameters @startDate and @endDate.

The stored procedure will have two parameters and you pass these into the data set via the parameter tab on the dataset menu.

If you are using a View or RAW SQL you will need to add a where clause to the SQL like such:

Where cast(Date_Recieved as date) between @parameter1 and @parameter2

then in the parameters section of the dataset options you will see these two appear and populate them with the @start and @endDate.