R
Raj
I am working on a ASP.NET 1.0 project in VS.NET 2003 and have added a
crystal report 9.2 report to it.
After building solution when I load the page with this report, it
gives me error
Compiler Error Message: BC30002: Type 'Report1' is not defined.
Report1.vb is the class object which gets created when the Report1.rpt
is added to the project. I have verified with ildasm utility that it sits in
my project.dll.
Why ASP.NET can't find it? Am I missing something here?
I am listing down the code for reference and would highly appreciate
any help or ideas.
Dim crReportDocument As Report1
Dim crTableLogonInfo As CrystalDecisions.Shared.TableLogOnInfo
Dim crConnectionInfo As CrystalDecisions.Shared.ConnectionInfo
Dim crTable As CrystalDecisions.CrystalReports.Engine.Table
' Make this a separate function ProvideLogOnInfo()
crReportDocument = New Report1
crTableLogonInfo = New CrystalDecisions.Shared.TableLogOnInfo
crConnectionInfo = New CrystalDecisions.Shared.ConnectionInfo
crConnectionInfo.DatabaseName = "database"
crConnectionInfo.ServerName = "server" 'or DSN for ODBC
crConnectionInfo.UserID = "User"
crConnectionInfo.Password = "passsword"
crTableLogonInfo.ConnectionInfo = crConnectionInfo
For Each crTable In crReportDocument.Database.Tables
crTable.ApplyLogOnInfo(crTableLogonInfo)
Next
'Trap any errors that occur on export
Try
CRV_CrystalReportViewer.ReportSource = crReportDocument
Catch err As Exception
Response.Write(err.ToString())
End Try
crystal report 9.2 report to it.
After building solution when I load the page with this report, it
gives me error
Compiler Error Message: BC30002: Type 'Report1' is not defined.
Report1.vb is the class object which gets created when the Report1.rpt
is added to the project. I have verified with ildasm utility that it sits in
my project.dll.
Why ASP.NET can't find it? Am I missing something here?
I am listing down the code for reference and would highly appreciate
any help or ideas.
Dim crReportDocument As Report1
Dim crTableLogonInfo As CrystalDecisions.Shared.TableLogOnInfo
Dim crConnectionInfo As CrystalDecisions.Shared.ConnectionInfo
Dim crTable As CrystalDecisions.CrystalReports.Engine.Table
' Make this a separate function ProvideLogOnInfo()
crReportDocument = New Report1
crTableLogonInfo = New CrystalDecisions.Shared.TableLogOnInfo
crConnectionInfo = New CrystalDecisions.Shared.ConnectionInfo
crConnectionInfo.DatabaseName = "database"
crConnectionInfo.ServerName = "server" 'or DSN for ODBC
crConnectionInfo.UserID = "User"
crConnectionInfo.Password = "passsword"
crTableLogonInfo.ConnectionInfo = crConnectionInfo
For Each crTable In crReportDocument.Database.Tables
crTable.ApplyLogOnInfo(crTableLogonInfo)
Next
'Trap any errors that occur on export
Try
CRV_CrystalReportViewer.ReportSource = crReportDocument
Catch err As Exception
Response.Write(err.ToString())
End Try