2 Replies Latest reply: Nov 30, 2012 2:00 AM by David_T RSS

    previous days data based on passing parameter and date

    user12255470
      Hi,

      i have one rek..that requirement to to show the previous days data based on the number passing to the parameter parameter.

      lets suppose if user enters the date '25 Mar 2012 in one dashboard prompt and in another prompt user enters the no.of days(Ex: 5).then report should display the last 5 days data i.e 25 mar 2012,24 mar 2012,23 mar 2012,22 mar 2012,21 mar 2012.

      can anybody tell me how can i achieve this..

      Thanks in advance...
        • 1. Re: previous days data based on passing parameter and date
          Srini VEERAVALLI
          Use presentation variable for both dt for date n for number
          In you report for the date column->filter -> Advanced button-> convert this filter to SQL and use the below exp.
          for between clause.
          TimestamDiff(SQL_TSI_DAY, Cast('@{n}' as int),

          Cast(Cast ('@{dt}' as Char) as Timestamp))

          And
          Cast(Cast ('@{dt}' as Char) as Timestamp)

          Appreciate if you mark as correct/helpful
          • 2. Re: previous days data based on passing parameter and date
            David_T
            user12255470 wrote:
            Hi,

            i have one rek..that requirement to to show the previous days data based on the number passing to the parameter parameter.

            lets suppose if user enters the date '25 Mar 2012 in one dashboard prompt and in another prompt user enters the no.of days(Ex: 5).then report should display the last 5 days data i.e 25 mar 2012,24 mar 2012,23 mar 2012,22 mar 2012,21 mar 2012.

            can anybody tell me how can i achieve this..

            Thanks in advance...
            Read the article and adapt it to what you are doing. It's very similar...

            http://oraclebizint.wordpress.com/2008/03/11/oracle-bi-ee-101332-rolling-yearmonth-and-date-filters-moving-window-filters/