setup custom date in SSRS report

I need setup custom date in my report. Right now report is running based on ORDERDATE using parameters (startdate and enddate).
In my case startdate and enddate are always the same.
What I need is create statement letting me run report based on:

If today is Monday then ORDERDATE = today-3 else if today is any other day of the week (Tue, Wed, Thu, Fri) then
ORDERDATE=today-1

Weekends (Sat, Sun) excluded.

No idea how to do that is SSRS.

thanks for help.

henry
henryk123Asked:
Who is Participating?
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.

lcohanDatabase AnalystCommented:
Please see link below and in particular "Parameter Properties - Default Values"
Use "Get values from a query" option and put the simple SQL query that will return you the needed value based on the logic you described above. I think a simple CASE structure would do it for both Start and End date.

http://upland.screenstepslive.com/s/EPMLive2010/m/AdminGuide2010/l/154807-custom-ssrs-reports-setting-report-parameters
0
henryk123Author Commented:
I'm pretty new with SSRS. I know how to do that in CR but SSRS is too confused for me.
Can you help with that ?

henry
0
lcohanDatabase AnalystCommented:
" Right now report is running based on ORDERDATE using parameters (startdate and enddate). "
So what are you using to Edit the report? BIDS or Report Builder?
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

henryk123Author Commented:
Report Builder.
0
henryk123Author Commented:
I've setup what I want use below formula:
= Iif(Weekday(Today()) = 2, DateAdd("d", -3, Today()), DateAdd("d", -1, Today()))

Technically I will run that report - Mon-Fri so I can exclude weekends that way.

I have following question:
Need add total sum from report into email subject line.
Any way to do that ?

thanks

henry
0

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
henryk123Author Commented:
Figured out custom code.
0
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
SSRS

From novice to tech pro — start learning today.

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.