0
votes

I created a SSRS report and I wanted to pass date (begin date and end date). I am not populating the field on the report (i.e its not in select statement). In this case how to assign report parameters to query in the 'Report Parameter Properties' window.

SELECT * FROM EMPLOYEE WHERE DOB between @BEGINDATE and @ENDDATE

1

1 Answers

1
votes

You don't assign parameters to a query in the "Report Parameter Properties" dialog. Here you set up the properties of the parameter itself: it will live in the report. (Here you will want to specify a date.)

Then, in the dataset for your query, you can assign parameters to your query. The easiest way to do this is just use an identically named parameter in the query by prefixing '@'. That is the parameter named BeginDate can be used as @BeginDate. The BIDS will take care of mapping the query parameter to the report parameter. You can do this manually or adjust BIDS mappings on the Parameters section of the Dataset Properties.