How to filtering data with a range date

  • Hi,

    I have a report and I want to do this:

    One parameter (RangeDates) with values : Yesterday, week, month.

    Other parameter (EndDate) with actual date.

    and one parameter (StartDate) that I want to show the date after a choice from RangeDates.

    Eg:

    today is 03/30/2011

    If RangeDates = Week, i want that StartDate will be 03/23/2011

    How can I do this ?

    tks

  • So a week is the current date - 7 days, what is a month? Current date -1 month, or current date - x days, etc.?

  • Sorry Daniel,

    I have a parameter RangeDates with values:

    yesterday

    weekly -- today -7

    Monthly -- today -30

    Other parameter (EndDate) with actual date.

    After I select a option (Yesterday, weekly or Monthly) I want that appear the date.

    I do this code in Available Values of StartDate:

    =Switch((Parameters!RangeDate.Value)= 0, Cdate(Dateadd("d",-1, now())),

    (Parameters!RangeDate.Value)= 1, Cdate(Dateadd("d",-7, now())),

    (Parameters!RangeDate.Value)= 2, Cdate(Dateadd("d",-30, now())))

    But When I select weekly for example, the StartDate show: <select a value> and below show the date, but I can't to select. When I click, it does not accept.

    do you understand ?

  • If I understand you want to make the StartDate parameter dependant on the choice you make in your Yesterday/LastWeek/LastMonth Parameter.

    In the StartDate Parameter make the default/available date based on a query that returns the proper start date.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply