Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Default value for report parameter date field Expand / Collapse
Author
Message
Posted Tuesday, November 12, 2013 7:00 AM


Say Hey Kid

Say Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey Kid

Group: General Forum Members
Last Login: Wednesday, August 10, 2016 2:49 AM
Points: 673, Visits: 1,379
Hi,

My SSRS report parameter date field requires “next Monday” as default Start date and “Sunday of the next week” as default End Date. Can it be accomplished using SSRS expression similar to this?
DateAdd("d",40,Today())
Post #1513446
Posted Tuesday, November 12, 2013 7:25 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 2:35 AM
Points: 7,757, Visits: 9,067
This will give you the date of the next monday (note if today is monday then today is the date returned)

=DateAdd(DateInterval.Day,7-Weekday(Today,FirstDayOfWeek.Tuesday),Today)



Far away is close at hand in the images of elsewhere.

Anon.

Post #1513458
Posted Wednesday, November 13, 2013 2:22 AM


Say Hey Kid

Say Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey Kid

Group: General Forum Members
Last Login: Wednesday, August 10, 2016 2:49 AM
Points: 673, Visits: 1,379
Thanks David, for sharing that insight.
I have put the end date default date as:
=DateAdd(DateInterval.Day,14-Weekday(Today,FirstDayOfWeek.Monday),Today).
I hope it is correct.
Post #1513743
Posted Wednesday, November 13, 2013 2:52 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 2:35 AM
Points: 7,757, Visits: 9,067
For your end date I think it should be

=DateAdd(DateInterval.Day,6,DateAdd(DateInterval.Day,7-Weekday(Today,FirstDayOfWeek.Tuesday),Today))



Far away is close at hand in the images of elsewhere.

Anon.

Post #1513756
Posted Thursday, November 14, 2013 3:55 AM


Say Hey Kid

Say Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey Kid

Group: General Forum Members
Last Login: Wednesday, August 10, 2016 2:49 AM
Points: 673, Visits: 1,379
Thank You, David once again. Let me try it out.
Post #1514211
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse