April 8, 2011 at 5:30 am
Hi
I currently have a default parameter in a report
=DateAdd("d",-1,Today())
I want to to be
>= -2 days and <= -1 day
if today is a monday (so saturday and sunday)
could anyone help with that?
Thanks in advance
April 8, 2011 at 7:16 am
I sounds like you are looking for a range of dates. you would have to define a seperate parameter in the report to store the second date. set one to -2 days and the other to -1 day. the >= and the <= you would handle in the dataset when you put the parameters to use.
Dan
If only I could snap my figures and have all the correct indexes apear and the buffer clean and.... Start day dream here.
April 8, 2011 at 7:52 am
the parameter is populated from a sharepoint document share
i can have as many parameters as i need but they need to change depending on the day
so unfortunately there will have to be an if today is monday then look at friday and saturday otherwise look at yesterday
thanks for the reply
April 8, 2011 at 8:06 am
Not sure if this would be any different using sharepoint, but if you were just doing this in SSRS you could set up 2 parameters, one each for the start and end date, and then use something like this to change the parameter value where the weekday is 5 for Friday
=iif(datepart("w",Today())=5,DateAdd("d",-2,Today()),DateAdd("d",-1,Today()))
You might need to change it from 5 depending on your date settings i.e. whether you have Sunday or Monday as day number 1
April 13, 2011 at 4:34 am
great that mate thanks a lot
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply