4 Replies Latest reply: Mar 8, 2013 5:55 AM by 937325 RSS

    Year Prompt selection

    937325
      Hi gurus,

      I have a requirement that if I select year value from prompt then the report data should filter with selected year and next year of the selected year.

      For Ex:

      If i select year 2010 then the year values in the report output should be 2010,2011.
      If i select year 2011 then the year values in the report output should be 2011,2012.


      that means selected year and selected year+1 should be displayed in the report.

      How can i achieve this, please help me out with your valuable solutions.


      Thanks,

      Tinku

      Edited by: 934322 on Mar 6, 2013 1:06 AM
        • 1. Re: Year Prompt selection
          sayak
          Hi ,

          Try this :

          cast("YEAR column" as integer) in (cast(@{nxt_year} as integer),cast(@{nxt_year} as integer)+1,cast(@{nxt_year} as integer)+2

          Make this as prompted , by selecting Advanced SQL filter and offcourse define a presentation variable ' nxt_year ' .
          • 2. Re: Year Prompt selection
            Lakshmipathi
            Hi,

            1) create a presentation variable PRE_VAR.
            2) create a prompt on the year column and assign the value to the presentation variable PRE_VAR.
            3) create two filters in the report with OR condition like (Year = PRE_VAR OR Year = PRE_VAR + 1)

            It may work for your requirement.


            Regards,
            Lakshmipathi.
            • 3. Re: Year Prompt selection
              995121
              Hi,

              Create a presentation variable for a prompt and use that variables in the report filter for the year column using between operator.

              For example if your presentation variable name is year then go to report and filter on column using between @{year} and @{year}+1

              Thanks,
              Phani.
              • 4. Re: Year Prompt selection
                937325
                Hi,


                Sorry for the ate response i got the solution by using the following expression in advanced Sql Filter


                "Fiscal Time"."FISCAL_YEAR" >= (@{FY}{2012}) and "Fiscal Time"."FISCAL_YEAR" <= (@{FY}{2012}+1)



                Thanks.