Custom Code in SSRS, error: character is not valid

hi there:
  I've put a function into SSRS:



After call it in the layout =code.GetNode(Fields!node_id.Value), it always said the Character is not valid. Can someone show me where it went wrong in the function?

 thanks

 Hui
Function GetNode(byval ll_node_id as string) as string
    if IsDBNull(@ll_node_id)
        then lc_node = "5006"
    Else
         lc_node = ll_node_id
    END IF
	 return "Hello"
END Function

Open in new window

HuiShiAsked:
Who is Participating?
 
mvgeertruyenCommented:
sorry:
ii_node_id is nothing

or
ii_node_id = ""
0
 
Nathan RileyFounderCommented:

Function GetNode(byval ll_node_id as string) as string
    if IsDBNull(@ll_node_id) = ???????
        then lc_node = "5006"
    Else
         lc_node = ll_node_id
    END IF
         return "Hello"
END Function

Open in new window

0
 
HuiShiAuthor Commented:
IsDBNull is a function in VB.NET, it returns true or false
0
 
mvgeertruyenCommented:
You have defined ll_node_id as string; are you not better off doing if ll_node_id = nothing or ll_node_id = ""?
0
 
HuiShiAuthor Commented:
I trie dif ii_node_id = nothing, it said Syntax error...
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.