SSRS set Parameter value from a Parameter

Hi,
I am using DateStart and DateEnd parameters and in need to have a "quick select" for "Today" and "Yesterday"
The problem is when I load the expression for the DateStart and DateEnd from "Quick Select" I get data type error.

Quick Select is a text with vals "Today" and "Yesterday"
DateStart  and DateEnd  are datetime
=Parameters!DateStart.Value
=
=IIF(Parameters!Qpick.Value = "Today", Parameters!DateStart.Value = Today(), IIF(Parameters!Qpick.Value = "Yesterday", Parameters!DateStart.Value = DateAdd("d", -1, Today()), Parameters!DateStart.Value))
****************************************************
=Parameters!DateEnd.Value
=
=IIF(Parameters!Qpick.Value = "Today", Parameters!DateEnd.Value = DateAdd("d", 1, Today()), IIF(Parameters!Qpick.Value = "Yesterday", Parameters!DateEnd.Value = Today(), Parameters!DateEnd.Value) )

Open in new window

JoeUSAsked:
Who is Participating?
 
planoczCommented:
Your code should work on the report also.
Ofcourse it is better to have it setup in the SP if you can.
0
 
planoczCommented:
Where are you placing the parameters in the report? Or are you just loading up the parameter fields?
0
 
JoeUSAuthor Commented:
DateEnd and DateStart are from the stored procedure the Qpick is added from report parameters.  They are all loaded into the top parameters section
0
 
planoczCommented:
I have to ask, In the report did you set the data type of qpick to DataTime?
0
 
JoeUSAuthor Commented:
I have learned that the selected item is not available in the SSRS controls for the expression builder. I pushed all of these functionality back to the database.
Please let me know if I am wrong with what I have learned so far.
Thank you.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.