Avatar of henry
henry Flag for United States of America

asked on 

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
SSRS

Avatar of undefined
Last Comment
henry
Avatar of lcohan
lcohan
Flag of Canada image

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
Avatar of henry
henry
Flag of United States of America image

ASKER

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
Avatar of lcohan
lcohan
Flag of Canada image

" 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?
Avatar of henry
henry
Flag of United States of America image

ASKER

Report Builder.
ASKER CERTIFIED SOLUTION
Avatar of henry
henry
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of henry
henry
Flag of United States of America image

ASKER

Figured out custom code.
SSRS
SSRS

SQL Server Reporting Services (SSRS) is a server-based report generation software system from Microsoft. It can prepare and deliver a variety of interactive and printed reports and is administered via a web interface or its web service. Its web services interface also supports the development of custom reporting applications. Finally, SSRS can also be integrated with SharePoint. SSRS competes with other business intelligence tools, most prominently Crystal Reports.

10K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo