Using data fields in custom code

  • I am using SSRS. I want to write custom code with my data fields available in the report. How is it possible?

  • I am not sure how can one access data fields in custom code but you can pass the data field values as input parameters to functions defined in custom code.

    --Ramesh


  • Hi, i am trying to explain with an example:

    Suppose there is a field in the dataset say "EmpName", which has spaces in there but you want to display the "EmpName" without any spaces in the report.

    For the above purpose, i have created the below vb function and has called in the table column.

    Function (written as custome code):

    Public Function RemoveSpaces(ByVal EmpNm as String) as String

    Return Replace(EmpNm," ","")

    End Function

    Calling:

    =Code.RemoveSpaces(Fields!EmpName.Value)

    Let me know if this is what you were looking for.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply