1

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"

助言がありますか?

4

1 に答える 1

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

CrystalReportモデル接続でユーザーとパスワードを設定することを忘れないでください

于 2012-05-17T20:11:40.813 に答える