sample CC :
Public Shared Function RetCardHolderName(lastname as string, middle as string,firstname as string) as String
If ( firstname is system.dbnull.value OR len(trim(firstname))=0 ) Then
return ( trim(lastname))
else
if ( middle is system.dbnull.value OR len(trim(middle))=0 ) Then
return (trim(firstname) & " " & trim(lastname))
else
return (trim(firstname) & " " & trim(middle) & " " & trim(lastname) )
end if
end if
End Function
I wrote this CC to return the first, middle and last names concatenated as one string.
from the report I pass the parameters as :
in the Expression window for the field :
=Code.RetCardHolderName(Fields!LAST_NAME.Value, Fields!MID_NAME.Value, Fields!FIRST_NAME.Value)|||Thank You! The example was also a big help!
No comments:
Post a Comment