Parameter RRS feed

  • Question

  • User-1499457942 posted


      In a parameter i want to display Years from 2002 to till current Year


    Friday, December 15, 2017 9:42 AM


  • User726159118 posted

    Hi Jagjit

    My solution:

    1. Right click the parameter under the "Report Data" and select "Parameter Properties"

    2. Select "Available Values" section

    3. Click the "Get values from a query" option

    4a. Select the appropriate query to use make sql for getting year data.

    like this

    with yearlist as 
        select 2004 as year
        union all
        select yl.year + 1 as year
        from yearlist yl
        where yl.year + 1 <= YEAR(GetDate())
    select year from yearlist order by year desc;

    Or Use stored procedure to get values.

    4b. Select the Value that you want the main query to use to generate the data

    4c. Select the Label that will show in the drop down box that the User sees and selects a option from

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, December 15, 2017 9:52 AM