Actually,
I've just found a way to do this without using external classes. I know this is an old thread but it might help for historical...
Heres how, the ideal is to "transform" the data set into a multivalued parameter (or if you need several fields, transform it in multiple multivalued parameters).
The multivalued Report Parameter must have the following characteristics:
Hidden = True
Allow Multiple Values = True
Available Values tab:
Chose the desired dataset. Select the searchable id as Value id, and the field you want to expose as Label Field.
Default Values Tab - Get Values from a Query.
Choose the same Dataset as choosen in the available Values Tab.
Value Field the same you choose for value id.
Set the parameter to never refresh (or it will be loading the data from each iteraction of another parameter).
Now, the idea is make this Parameter "searchable". From this point you exposed the Dataset as an array in the Multi valued Parameter.
Now in a custom code insert the following code:
function GetDataSetLabelFromValue( id as integer) as String
dim i as integer
i = 0
for i = 1 to Report.Parameters!YourParameter.Count()
if Report.Parameters!YourParameter.Value(i) = id then
GetDataSetLabelFromValue = Report.YourParameter!ReportParameter1.Label(i)
Exit For
End if
next i
End Function
Hope it helps.
Miguel Catalão
- Proposed as answer by
Seth Sanusi
Wednesday, April 20, 2011 11:20 PM