2017-07-02 6 views
0

これは私のコードですが、report.SetDatabaseLogonで統合セキュリティを設定する方法はわかりません。レポートはWebフォームにロードされていませんが、エラーは発生しません。ASP.NETのCr​​ystalレポートとの統合セキュリティ

void GetUsers() 
{ 
    ReportDocument report = new ReportDocument(); 
    report.Load(Server.MapPath("~/Admin/Reports/rptUsers.rpt")); 
    report.SetDatabaseLogon("(localdb)", "CAPROJ2"); 
    report.SetParameterValue("User", "Arteezy"); 

    crvUsers.ReportSource = report; 
    crvUsers.DataBind(); 
} 

編集:私はしかし、私はこれを使用しようとしたが、それは「\」認識できないエスケープシーケンスを示して、私のサーバー名が\(localdb)SQLであることを含めるのを忘れていました。

答えて

0

SAPフォーラムによると、あなたが試みることができる:

report.DataSourceConnections[0].IntegratedSecurity = true; 
// and/or 
report.DataSourceConnections[0].SetConnection("(localdb)", "CAPROJ2", true); 
関連する問題