Is there anything obviously incorrect in what I am doing, below? Any help would be most appreciated.
I am using Northwind database and working on a proof-of-concept. I have added references to the System.Data and System.XML assemblies using Report-Report Properties-References and have a report with three columnq - CompanyName, ContactName and CustomerOrderCount.
I am atempting to use custom code in SSRS 2008 to extract CustomerOrderCount (Expression"=Code.GetCusto
D.Value") by calling the following code/function which I copied from http://www.devx.com/codemag/Article/33656/1954
in the Report-Report Properties-Code box, but I receive only "#Error" in the CustomerOrderCount:
l CustomerID As String) As Integer
Dim oConn As New System.Data.SqlClient.SqlC
oConn.ConnectionString = "Data Source=MyServer;Initial Catalog=Northwind;Integrat
Dim oCmd As New System.Data.SqlClient.SqlC
oCmd.Connection = oConn
oCmd.CommandText = "Select count(*) From Orders Where CustomerID = @CustomerID"
Dim nRetVal As Integer = oCmd.ExecuteScalar()