Crystal reports Logon box pops up prompting me for password
Posted on 2008-10-24
Here's what I have now, and am getting prompted for the password in the logon box, before the report loads. The userid, database, and servername are filled in, but not the password.
Dim rpt as New CrystalDecisions.CrystalReports.Engine.ReportDocument
strConnstring = "Server=servername, Database = dbname, UID=sa, Pwd=Password1"
cn.connectionstring = strConnString
Dim crystalReportViewer1 as new CrystalDecisions.Web.CrystalReportViewer
dim rptPath as string
rptPath = Server.MapPath("Reports\CrystalInvoiceAnnual.rpt")
crystalReportViewer1,ReportSource = rpt
rpt.SetDatabaseLogon("sa", "Password1", "server", "db", True)
CrystalReportViewer1.reportsource = rpt