Tuesday, November 30, 2010

SSRS - Clear multi-value cascading dropdown selected value

Most of us are facing problems that multi-value cascading dropdown selected value is not clearing when changing the value in parent dropdown.


For example I am having two dropdowns State and City in SSRS report. Based on State dropdown selected value, City dropdown values will be populated.

In my sample, State dropdown will have two values "Tamilnadu" and "Karnataka".
Cities for Tamilnadu will be "Trichy" and "C.City".
City for Karnataka will be "C.City".

Initially in State dropdown I will select Tamilnadu and in City dropdown I will select C.City.








Then if I select Karnataka in state dropdown city dropdown will be populated with C.City. But the problem is by default it will be selected as shown below.








But we may need that when it is populating newly, no values should be selected by default.


The solution is very simple.


In Report Parameters, city parameter has value field and label field as City. This is the root cause for this problem.
















If I change the value field to state like below, the problem will be solved.
















Because the state value is always changing. So the report will assume it as a different item. We can get the desired output.

No comments:

Post a Comment