or
Hello,
I am trying to create a textbox that reads APPLICATION NAME from a table and displays it in the footer of the report.
I have created a class with following code:
Public Class CVA_Rpt Public Shared Function Get_Config_Item(ByVal Item_name As String) As String Dim mySelectQuery As String = "SELECT Constant_Value from tbl_CVA_Config Where Constant_Name='" & Item_name & "'" Dim myConnString As String = ConfigurationManager.ConnectionStrings("CVA_Reporting").ToString() Dim myConnection As New SqlClient.SqlConnection(myConnString) Dim myCommand As New SqlClient.SqlCommand(mySelectQuery, myConnection) myConnection.Open() Dim myReader As SqlClient.SqlDataReader myReader = myCommand.ExecuteReader() ' Always call Read before accessing data. Get_Config_Item = "" While myReader.Read() Get_Config_Item = myReader.GetString(0) End While ' always call Close when done reading. myReader.Close() ' Close the connection when done with it. myConnection.Close() End Function Public Shared Function Application_Name() As String Application_Name = Get_Config_Item("APPLICATION_NAME") 'Application_Name = "CVA Reports" End Function End Class= CVA_Reports.CVA_Rpt.Application_Name()An error has occurred while processing TextBox 'txtApp_Db_Name': An error has occurred while executing function App_name(). Check InnerException for further information. ------------- InnerException ------------- Exception has been thrown by the target of an invocation. ------------- InnerException ------------- Object reference not set to an instance of an object.Note: I testing the CVA_Reports.CVA_Rpt.Application_Name() using a ASP page and it returns the desired value.
How can fix this error ? I have looked everywhere on how to fix this error. I have no clue. Please help. THANK YOU!
Server Error in '/' Application. -------------------------------------------------------------------------------- Configuration Error Description: An error occurred during the processing of a configuration file required to
service this request. Please review the specific error details below and modify your configuration
file appropriately. Parser Error Message: Could not load file or assembly 'Telerik.ReportViewer.WebForms, Version=4.1.10.921,
Culture=neutral, PublicKeyToken=a9d7983dfcc261be' or one of its dependencies.
The system cannot find the file specified. (C:\Inetpub\CEMM\web.config line 45) (C:\Inetpub\CEMM\web.config line 114) Source Error: Line 112: <httpModules> Line 113: <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> Line 114: <add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule" /> Line 115: <add name="RadCompression" type="Telerik.Web.UI.RadCompression" /> Line 116: </httpModules> Source File: C:\Inetpub\CEMM\web.config Line: 114 -------------------------------------------------------------------------------- Version Information: Microsoft .NET Framework Version:2.0.50727.3615; ASP.NET Version:2.0.50727.3618Line 114: <add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule" />