Unable to retrieve Crystal report in ASP.NET app

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,525
Members
44,997
Latest member
mileyka

Latest Threads

Top