我有使用SAP Crystal Reports的ASP.NET(C#)应用程序。在Visual Studio中一切正常,但是当我将其部署到IIS时,会发生以下错误:
"Failed to open the connection. Failed to open the connection 'report name'.rpt".
我已将我的报告更改为使用系统DSN现在上一个错误消失了,但它会生成以下错误:
"Database Logon Failed"
有什么建议吗?
答案 0 :(得分:0)
Dim db As New _yourdbcontext()
Dim cr As New ReportDocument
cr.Load(Server.MapPath("~/yourreport.rpt"))
cr.SetDataSource(db.yourtable.ToList())
CrystalReportViewer1.ReportSource = cr
不要忘记在水晶报告和模型连接中设置用户和密码
答案 1 :(得分:0)
如果有人在Oracle中遇到此问题,请检查此链接。希望它会帮助某人:https://stackoverflow.com/a/10764077/1380428