I've the following WHERE CLAUSE of a SQL Query String in the SSRS Dataset:
WHERE "Input_date" >={ts '2009-01-01'}
AND "Input_date" < {ts '2009-12-31'}
And now, I'd like to use report parameter to wrap up the dates in the SQL statement, i.e. @indate1, and @indate2.
I've tried this, but error occurs:
WHERE "Input_date" >={ts @indate1}
AND "Input_date" < {ts @indate2}
Please kindly advise. Thanks.
Cascading parameters provide a way of managing large amounts of data in a paginated report. You can define a set of related parameters so that the list of values for one parameter depends on the value chosen in another parameter.
In the Report Data pane, expand the Parameters node, right-click the report parameter that was automatically created for the dataset parameter, and then click Parameter Properties. In the General tab, select Allow multiple values to allow a user to select more than one value for the parameter.
To provide available values for a parameter from a dataset In the Report Data pane, right-click the parameter @StoreID, then click Parameter Properties. Click Available Values, and then click Get values from a query.
What have you done to add these parameters? I assume that you have altered the dataset query with the changes you have posted in your question. There are two more steps you need to perform to make this work:
@indate1
and @indate2
, and set each parameters value to the parameters you defined in step one.Input_date
is a column in your table):WHERE Input_date >= @indate1 AND Input_date < @indate2
This is specific to the BIDS 2008 version of Visual Studio. If you are using report builder or something else, please let me know, and I can change the instructions a bit.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With