Parameters SSRS- BIDS

  • I am using BIDs and have a parameter called 'period' and have specifed values from 1 to 12.

    my question is how do i related the field 'period' to the what the parameter.

    Thanks

  • Assuming the parameter named period. The SQL variable will be called @period. You don't need to declare it. Juste use it directly in the query.

    SELECT * FROM tbl where period = @period

    If the parameter is multi-select then you can directly use in

    SELECT * FROM tbl where period in (@period)

    If on the other hand you used a stored proc, then the parameter should be auto - created / sent to the proc. If you change the proc, you need to refresh the fields to get the new definition. Also in that case the in trick would not work and you'd have to split the values once in the proc.

  • Thank you but it keeps saying error ' Ambiguous column name 'period' '

    Any ideas

  • its ok, I was writing the wrong field

    Thanks for you help

  • No you just needed to say from which table / other object to take the period from.

  • yes sorry that is what I meant I was putting the wrong table.

    But Ive still got a problem it runs perfectly within qeury designer, but when i actually run th report I get the below error, before I can even enter the parameters. Ive checked the spelling etc..... Any ideas?

    "An Error Occurred during local report processing. The definition of the report MW0006 is invalid.

    The value Expression for the query parameter @Period refer to a non-exsisting report parameter 'period' "

  • Then you need to manually add the parameter to the report. In design mode, if you right click under the footer section of the report you should see a menu option to manager parameters.

  • When i right click on the footer i dont have the options for parameters.

    But i have dragged the parameter onto the report footer, but still get the error message!! 🙁

  • I don't have bids 2008 here so I can't give you a screenshot nor look arount. AFAIK, the parameters are also available in the same treeview as the datasets.

Viewing 9 posts - 1 through 8 (of 8 total)

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