Link to home
Start Free TrialLog in
Avatar of HuiShi
HuiShi

asked on

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

Avatar of Nathan Riley
Nathan Riley
Flag of United States of America image


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

Avatar of HuiShi
HuiShi

ASKER

IsDBNull is a function in VB.NET, it returns true or false
You have defined ll_node_id as string; are you not better off doing if ll_node_id = nothing or ll_node_id = ""?
Avatar of HuiShi

ASKER

I trie dif ii_node_id = nothing, it said Syntax error...
ASKER CERTIFIED SOLUTION
Avatar of mvgeertruyen
mvgeertruyen
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial