Anyone see an issue with this report code?
function GetDataSetLabelFromValue(ByVal id as integer) as String
	dim i as integer
	i = 0
		for i = 1 to Report.Parameters!multivalueid.Count()
			if Report.Parameters!multivalueid.value(i) = id  then
 				GetDataSetLabelFromValue = Report.Parameters!multivalueid.Value(i)
		Exit For
		End if
	next i
End Function		
September 10th, 2015 2:16pm

Hi Helixpoint, 

According to your report code, you want to get the multiple-parameter value based on id, right? 

In Reporting Services, if you want to get the one of the multiple parameter values, we can use Parameters!id.value(number) to get the required value. In your scenario, if you want to get the value based on the id, please refer to the below code: 

function GetDataSetLabelFromValue(ByVal id as integer) as String
	dim i as integer
		for i = 0 to Report.Parameters!multivalueid.Count()
			if i = id  then
 				GetDataSetLabelFromValue = Report.Parameters!multivalueid.Value(i)
		Exit For
		End if
	next i
End Function

If you have any other question, please feel free to ask. 

Regards,
Shrek Li

Free Windows Admin Tool Kit Click here and download it now
September 10th, 2015 10:37pm

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

Other recent topics Other recent topics