HuiShi
asked on
Sql Server Custom code Issue in SSRS
Hi there:
In the Code tab in Report Properties, I have the following code:
Function DBConnect() As System.Data.SqlClient.SqlC onnection
Dim connectionstring As String
connectionstring = "server=lafap; database=astea8l; uid=re; pwd=v8;"
Dim cn As New System.Data.SqlClient.SqlC onnection( connection string)
Return cn
End Function
Function test() as String
Dim cn As New System.Data.SqlClient.SqlC onnection
cn.Open()
cn.Close()
return "Connected"
END Function
Also , in the reference tab, I've referenced the System.Data.
in the layout, I put =code.test() into one of the table field. And SSRS gives me the following error:
The value expression for the textbox textbox4 contains an error: The ConnectionString property has not been initialized.
Does someone have any idea how to get rid of this error?
Also any recommendations on the debug env. for Custom Code?
Thanks a lot
Hui
In the Code tab in Report Properties, I have the following code:
Function DBConnect() As System.Data.SqlClient.SqlC
Dim connectionstring As String
connectionstring = "server=lafap; database=astea8l; uid=re; pwd=v8;"
Dim cn As New System.Data.SqlClient.SqlC
Return cn
End Function
Function test() as String
Dim cn As New System.Data.SqlClient.SqlC
cn.Open()
cn.Close()
return "Connected"
END Function
Also , in the reference tab, I've referenced the System.Data.
in the layout, I put =code.test() into one of the table field. And SSRS gives me the following error:
The value expression for the textbox textbox4 contains an error: The ConnectionString property has not been initialized.
Does someone have any idea how to get rid of this error?
Also any recommendations on the debug env. for Custom Code?
Thanks a lot
Hui
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks
http://forums.asp.net/p/983330/1262860.aspx
or
http://forums.asp.net/t/994521.aspx