get report parameters to work

  • I want to add report parameters to a sql server report service 2008 that has been generated by the report wizard and have the parameters work.

    I can get the report parametes to look like they work by doing the following:

    1. select view then report data then right click parameters in the report data window.

    2. I then select add parameters then enter a 'name' then enter a prompt name and then select data type.

    3. I then right click on the dataset and then click dataset properties and then click on parameteres in the dataset properties window and add

    the parameters I want.

    The above looks ok, but the parameters do not work.

    What do I need to do get the report parameters to work either after a new report has been setup using the report wizard and/or adding the

    report parameters to work at a later time.

  • Creating parameters in SSRS is step one...done

    have you referenced those variables in your underlying dataset SQL query

    Raunak J

  • Creating parameters in SSRS is step one...done

    have you referenced those variables in your underlying dataset SQL query

    Raunak J

  • There are two approaches in order to actually get report parameters to work.

    Approach one: when you create your underlying dataset, you explicitly define the parameters in a where clause of the statement by putting a @ symbol in front of the identifier (name) of the parameter. For example:

    select employee_name from Employees where employee_id = @emp_id

    Here @emp_id states it is a parameter and when you create such dataset SSRS actually performs two actions - first it creates a parameter (you can find in Parameters Tab in BIDS) and second - it binds the newly created parameter with the parameter defined on a dataset level (when you define a dataset, there is a Parameter tab, where such definitions are created

    Approach two - you first create a parameter and then reference it in the dataset - if you did this, you must open your dataset properties, go to Parameters and explicitly define binding between parameters in the report and the parameters in the dataset (again, parameters in the dataset must be starting with @symbol)

    My reccomendation is to use always approach one as at most of the times it does most of the work for you and all you need to do is customize the automaticalyy created parameters.

    /ivan

  • Thought you required answer...turned the other way round...cheerz!!! 😀

    Raunak J

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

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