locked
Is it possible to dynamically populate a parameter list with values based on another parameter value? RRS feed

  • Question

  • Is it possible to fill a parameter list with values based on another parameter value?

    Here's what I have so far (which hasn't worked)...

    I'd like to generate a report listing information for a student.  The report viewer would first select a school from the first drop-down menu, and then the second drop-down menu would populate with the list of students at that school.

    I have a dataset that calls a sp which returns a list of schools (SchoolID and SchoolName fields from the database table).

    I have another dataset that calls a sp (with SchoolID as the parameter) which returns a list of students for that school.

    Both datasets return the appropriate data when tested individually, but when I set up the Report Parameters and build the report, these errors come up...

    The value expression for the query parameter '@SchoolID' refers to a non-existing report parameter 'SchoolID'.

    The report parameter 'Student' has a DefaultValue or a ValidValue that depends on the report parameter "SchoolID".  Forward dependencies are not valid.

    ...Is it possible for the reoprt to generate a list of available parameter values based on the value selected for another parameter?

    Any help you can give me would be great!!  Thank you
    -Ethan

    Thursday, August 11, 2005 3:58 PM

Answers

  • I ran into that problem, and it was simply due to the fact that my parameters were in the wrong order. Try this : go into the parameters dialog and make sure the list-of-schools parameter is above the list-of-students parameter.

    Hope that helps.

    Thursday, August 11, 2005 9:01 PM

All replies

  • I ran into that problem, and it was simply due to the fact that my parameters were in the wrong order. Try this : go into the parameters dialog and make sure the list-of-schools parameter is above the list-of-students parameter.

    Hope that helps.

    Thursday, August 11, 2005 9:01 PM
  • If you look at the sample reports included with RS, you should see one called 'Product Line Sales'. It demonstrates what you are trying to do.
    Saturday, August 13, 2005 7:56 PM
  • hallo,

    i have the same problem, can you give me a example.

     

    thx

     

     

    Wednesday, January 18, 2006 4:22 PM
  • Yes, just fix your parameter order..

     

    Wednesday, November 28, 2007 8:49 PM