Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
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


SSChasing Mays

SSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing Mays

Group: General Forum Members
Last Login: Monday, December 15, 2014 2:22 AM
Points: 613, Visits: 1,160
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 @ 10:05 AM
Points: 7,056, Visits: 7,279
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


SSChasing Mays

SSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing Mays

Group: General Forum Members
Last Login: Monday, December 15, 2014 2:22 AM
Points: 613, Visits: 1,160
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 @ 10:05 AM
Points: 7,056, Visits: 7,279
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


SSChasing Mays

SSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing Mays

Group: General Forum Members
Last Login: Monday, December 15, 2014 2:22 AM
Points: 613, Visits: 1,160
Thank You, David once again. Let me try it out.
Post #1514211
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse