?
Solved

Custom Code in SSRS, error: character is not valid

Posted on 2009-04-20
5
Medium Priority
?
384 Views
Last Modified: 2012-05-06
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

0
Comment
Question by:HuiShi
  • 2
  • 2
5 Comments
 
LVL 12

Expert Comment

by:Nathan Riley
ID: 24186151

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
 

Author Comment

by:HuiShi
ID: 24186234
IsDBNull is a function in VB.NET, it returns true or false
0
 
LVL 6

Expert Comment

by:mvgeertruyen
ID: 24186366
You have defined ll_node_id as string; are you not better off doing if ll_node_id = nothing or ll_node_id = ""?
0
 

Author Comment

by:HuiShi
ID: 24194158
I trie dif ii_node_id = nothing, it said Syntax error...
0
 
LVL 6

Accepted Solution

by:
mvgeertruyen earned 1500 total points
ID: 24194473
sorry:
ii_node_id is nothing

or
ii_node_id = ""
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In SQL Server, when rows are selected from a table, does it retrieve data in the order in which it is inserted?  Many believe this is the case. Let us try to examine for ourselves with an example. To get started, use the following script, wh…
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
Integration Management Part 2
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question