troubleshooting Question

crystal report error in asp.net

Avatar of softlogique
softlogique asked on
Crystal ReportsDB Reporting Tools
2 Comments1 Solution1265 ViewsLast Modified:
Whenever i am trying to generate the report is showing an error on the code line "Dim rpt as New ReportDocument()". I am using asp.net with vb my site is hosted on server.

Dim rpt As New ReportDocument()
Dim con As New Data.SqlClient.SqlConnection("Data Source=chauffeur.db.5347618.hostedresource.com;Initial Catalog=chauffeur;User ID=chauffeur;Password=Soft@rudra1")
                    DBCommand = New SqlDataAdapter("Select * From EC Where name= '" & (cmbName.Text.Trim) & "' And Status = 'Existing'", con)
                    DBCommand.Fill(ds, "EC")
                    rpt.Load("~/CRM/crystal_report/ec_name.rpt")
                    rpt.Database.Tables(0).SetDataSource(ds)
                    CrystalReportViewer1.ReportSource = rpt
Dim rpt As New ReportDocument()
Dim con As New Data.SqlClient.SqlConnection("Data Source=chauffeur.db.5347618.hostedresource.com;Initial Catalog=chauffeur;User ID=chauffeur;Password=Soft@rudra1")
                    DBCommand = New SqlDataAdapter("Select * From EC Where name= '" & (cmbName.Text.Trim) & "' And Status = 'Existing'", con)
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 2 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros