title: SSRS Expression to show String array
body: <p>I have following custom code which finds given string in the input string and returns array of strings accordingly.</p>
  
  <pre><code>Public Function ConvertCode(ParamValues As String, findString As String) As String()
  Dim SrcArray() As String
  Dim FndArray() As String
  Dim DstArray() As String
  Dim i As Integer
  Dim j As Integer
  Dim k As Integer
  SrcArray = Split(ParamValues, ",")
  FndArray = Split(FindString,",")
  For k = LBound(FndArray) To UBound(FndArray)
  For i = LBound(SrcArray) To UBound(SrcArray)
      If (InStr(SrcArray(i), FndArray(k)) &gt; 0) Then
          DstArray(j) = SrcArray(i)
          j = j + 1
      End If
  Next i
  Next k
  ConvertCode  =  DstArray
  End Function 
  </code></pre>
  
  <p>I am using SSRS expression to get the value returned from this code.</p>
  
  <pre><code>=Join(Code.ConvertCode(Join(Parameters!ProcessingStatus.Value,","),"reject,fail,Reject,Fail"),",")
  </code></pre>
  
  <p>If there are no matching eleents in the ProcessingStatus it returns correctly and shows nothing but if there is matching strng then it is returning as #Error. Please help me.</p>