SSRS set Parameter value from a Parameter

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
=IIF(Parameters!Qpick.Value = "Today", Parameters!DateStart.Value = Today(), IIF(Parameters!Qpick.Value = "Yesterday", Parameters!DateStart.Value = DateAdd("d", -1, Today()), Parameters!DateStart.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

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Where are you placing the parameters in the report? Or are you just loading up the parameter fields?
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
I have to ask, In the report did you set the data type of qpick to DataTime?
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.
Your code should work on the report also.
Ofcourse it is better to have it setup in the SP if you can.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server 2005

From novice to tech pro — start learning today.