3

How to set Default value in multi-value parameter when one of the parameter is not present in the Available Value In SSRS Report

pleas Look this Image

I have Multi-Value Parameter Name "Student Id" , available value are "1,2,3,4,5,6,7".

Now I am Setting Default value 1,2 then multi parameter Selected the Student id 1 and 2.

But issue is when Set student id 1 and 10 from Report 2 to Report, it is not selecting any thing. Its because of Id 10 Which is Not in Present in value.

2 Answers2

1

I fixed this By using the LookupSet() method in SSRS

=LookupSet(Fields!ClassId.Value,Fields!ClassId.Value,Fields!StudentId.Value,"StudentDataSet")

its checking the value in Data Set and giving me Id like Student Example. if value is 1,2,10 then it give me 1,2,1,2,1,2 but i am not why its giving 1 and to multi time but its working for me Thanks. I am new in SSRS can you Explain me one more time so it will work for me ,or i am doing something wrong

0

Have you tried setting 10 as a available value, because you only have 1-7 so it might bug on the 10.

Flying Turtle
  • 366
  • 7
  • 20
  • value 10 is not present its right. but when i pass 1 ,2 and 10 then I want to select 1 and 2 in drop down , can you help me how to do that? any function by using i can select only 1 and 2 not 10. –  Mar 20 '15 at 12:41
  • then in that case remove 10 and add 2 I don't understand why you placed 10 if it's not an option to select. just 1 and 2 in that case. – Flying Turtle Mar 20 '15 at 13:59
  • I have the issue in my project, I am getting one id which is not in Available Value , its coming in default value , 10 but 10 is not present in Available So i put simple Example to know the Answer of my issue , Can you Tell me If 10 is Present, the how i can Set Default value , What is marching that is Student Id 1 –  Mar 20 '15 at 14:05
  • so what you're saying is that you're using two datasets, one for the options and another to select the options. can't you just edit the second query if that's the case? – Flying Turtle Mar 20 '15 at 14:08
  • Its coming via Parameter and where i have list of student its 1 to 60 , and after drill down i have to come this Report. And passing parameter is not same as available value. –  Mar 20 '15 at 14:20
  • if it's comming via parameter then set the available values of that parameter to the list of students, that way if the parameter is not inside the list of values it will be set to null. also, accept null as a possible value on that parameter so that you can run the repport – Flying Turtle Mar 20 '15 at 14:27
  • Student Id parameter type is Int and i am not getting make empty in parameter , for that i have to convert the parameter type to string , and the Its work .Is i am going right direction? Guide me Please . if you can write the step its bettor for me. the way i am going its not working –  Mar 20 '15 at 14:56
  • okay let's assume you have the dataset : studentsid, and you have the parameters : studentid_1 and studentid_2 and students if I understand right you are using the dataset studentsid to fill the paramter options of students and then you use studentid_1+2 to select from those list. what you want to do for both studentid_ is to set avialable values using the dataset studentsid just like you did with the paramter students. however with those you have to set "allow null value" to true and "allow multiple parameter" to false. this way if you get "10" it will not be in the list of studentsid – Flying Turtle Mar 23 '15 at 07:59
  • and you'll only send a null value instead of a false value to the paramter students and your dataset shouldn't fail. – Flying Turtle Mar 23 '15 at 08:00
  • First, realise that this is a workaround for your solution because what you want is not possible. However there is no reason for it not to work, can you please explain why it is "not working". – Flying Turtle Mar 30 '15 at 06:51
  • I fixed this By using the LookupSet() method in SSRS its checking the value in Data Set and giving me Id like Student Example. if value is 1,2,10 then it give me 1,2,1,2,1,2 but i am not why its giving 1 and 2 multi time but its working for me Thanks. I am new in SSRS can you Explain me one more time so it will work for me ,or i am doing something wrong –  Mar 31 '15 at 09:59
  • Can you look this issue http://stackoverflow.com/questions/29430920/ssrs-stacked-column-chart-legend-is-wrong-after-adding-lookset-inside-the-acti it is simlare to this –  Apr 06 '15 at 04:16