2012-05-17 127 views
1

我有使用SAP Crystal Reports的ASP.NET(C#)應用程序。在Visual Studio中一切正常,但是當我部署到IIS中出現下列錯誤:Crystal Reports「無法打開連接」錯誤ASP.NET

"Failed to open the connection. Failed to open the connection 'report name'.rpt". 

我已經改變了我的報告中使用系統DSN現在以前的錯誤消失,但它會產生以下錯誤:

"Database Logon Failed" 

有什麼建議嗎?

+0

您是否檢查了連接屬性? – 5arx

+0

IIS帳戶是否具有適當的權限? –

+0

是的。一切工作在Visual Studio中。我還有一些其他表,它們從相同的連接池中收集數據,即使在部署時也可以很好地工作 –

回答

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 

不要在水晶報表模式連接

相關問題