[英]Crystal Reports “Failed to open the connection” error in ASP.NET
我有使用SAP Crystal Reports的ASP.NET(C#)应用程序。 在Visual Studio中,一切正常,但是当我将其部署到IIS时,会发生以下错误:
"Failed to open the connection. Failed to open the connection 'report name'.rpt".
我已将报告更改为使用System DSN,现在以前的错误已消失,但它会产生以下错误:
"Database Logon Failed"
有什么建议么?
Dim db As New _yourdbcontext()
Dim cr As New ReportDocument
cr.Load(Server.MapPath("~/yourreport.rpt"))
cr.SetDataSource(db.yourtable.ToList())
CrystalReportViewer1.ReportSource = cr
不要忘记在水晶报表和模型连接中设置用户名和密码
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.