Jay Desai
Jay Desai

Reputation: 861

SSRS report multi select parameter does not select values automatically

In SSRS report I have 2 parameters ClassName and StudentName both are allow to select multiple values. StudentName parameter react according to ClassName parameter's value. Both parameters have default values. when I run the report default value selected in ClassName dropdown and as per ClassName value StudentName values selected by default in StudentName dropdown as per below image.

enter image description here

Now, When I select more than one values from ClassName as per below image I can retrieve correct student names in StudentName dropdown but values are not selected by default.

enter image description here

Expected result should be as below:

enter image description here

is this SSRS limitation? or is there any work around?

Upvotes: 2

Views: 3096

Answers (2)

kulvir
kulvir

Reputation: 79

Solution to this issue is to change the default options(student name) every time and in some way dependent on changed parameter(className). Like in your report student names are default options and remains same(Smith or Jack) for any class input and new options not getting select. earlier my values were Student1 result on first change of date later I add date to me student like Student1_2124 (2124 is Julian Date and dependes on Date parameter) It will change the Student everytime so result is all selected values new all selected parameter

all options would be selected only if you can make student name like Jack_className and use only before underscore to print in report. It worked for me.

Upvotes: 0

Jay Desai
Jay Desai

Reputation: 861

Modified StudentName dataset as below:

SELECT S.StudentName + '_' + CAST(ROW_NUMBER() OVER (ORDER BY S.StudentName ASC) AS VARCHAR(50)) AS studentname1,
       S.StudentName
FROM
(SELECT StudentName FROM Table_3 WHERE ClassName IN ( @ClassName )) S;

And modified Value field to studentname1 for @StudentName parameter in available values and default values.

Upvotes: 1

Related Questions