How to load data from database to a parameter drop down list after a value is selected in another drop down list in SSRS 2005?
Hi. Could anyone teach me how to load data from database to a parameter drop down list after a value is selected in another parameter drop down list SSRS 2005? For example, I have two parameters which are A Group(R, NR) and B Item. When i have selected R from A Group drop down list, then Items of R( R1, R2, R3...) will only be loaded into B Item drop down list. How to do it? It is something like OnChange method in asp.net. Thanks in advance.
September 28th, 2011 7:10am

Hi, You can do something similar to this. Lets say i have a country and state column in geography table then i can create two parameters as Parameter 1 for country the dataset would be : select country from geography. Create a parameter with name as "Country" and map the parameter to above dataset. Parameter 2 for State : select state , country from geography where Country = @Country. create a parameter with name as "state" and map the parameter to above dataset. HTH, RamRam
Free Windows Admin Tool Kit Click here and download it now
September 28th, 2011 7:26am

Hi Ram, Thanks for your reply. I did try the method u mentioned. But i got this error. "The report parameter 'State' has a DefaultValue or a ValidValue that depends on the report parameter "Country". Forward dependencies are not valid." How could i solve it? Thanks :)
September 28th, 2011 11:06pm

Leorence, As Ramakrishnan suggested you to create 2 parameters - country and state You also mapped each value to respective dataset. Now, you are getting some error (forward dependency not valid) For that you need to check your Parameter flow. Go to Parameter section of report (above Datasets section). Move Country parameter above the State. Since, state parameter is dependent on country. So, until there wont be any value for country you can't execute your state dataset. Hope, it makes sense to you. Regards, Manoj *Happy to help http://experiencingmsbi.blogspot.com/
Free Windows Admin Tool Kit Click here and download it now
September 29th, 2011 2:19am

Hi Manoj, Thank you very much.. I managed to do it. :D Regards, Leorence
September 29th, 2011 3:10am

Hi, Consider two parameters,Reportparameter1 and Reportparameter2 In Reportparameter1 :Available values ,select the dataset(eg dataset1) and corresponding value and label field Query for dataset1: SELECT BRANCH_CODE FROM FT_FC_FNMVT_DETAIL_INFO ORDER BY BRANCH_CODE Available values : Value field and label field: BRANCH_CODE In Reportparameter2: Query for dataset2: SELECT BRANCH_CODE, DOCUMENT_DATE FROM FT_FC_FNMVT_DETAIL_INFO WHERE (BRANCH_CODE IN (@ReportParameter1)) Available values : Value field and label field: DOCUMENT_DATE Regards Ramya
Free Windows Admin Tool Kit Click here and download it now
September 29th, 2011 3:18am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics