2009-07-06 63 views
7

不正確的日誌在打印報表時,用戶有時有以下錯誤:水晶報表:無法連接的參數

CrystalDecisions.CrystalReports.Engine.LogOnException: 
Error in File C:\DOCUME~1\carolec\LOCALS~1\Temp\temp_b117cc2e-c184-4556-a493-e04e6d4126fb {388C2B55-114E-4087-A22D-9289902AFDEB}.rpt: 
Unable to connect: incorrect log on parameters. ---> System.Runtime.InteropServices.COMException (0x8004100F): 
Error in File C:\DOCUME~1\carolec\LOCALS~1\Temp\temp_b117cc2e-c184-4556-a493-e04e6d4126fb {388C2B55-114E-4087-A22D-9289902AFDEB}.rpt: 
Unable to connect: incorrect log on parameters. 
    à CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.GetLastPageNumber(RequestContext pRequestContext) 
    à CrystalDecisions.ReportSource.EromReportSourceBase.GetLastPageNumber(ReportPageRequestContext reqContext) 
    --- Fin de la trace de la pile d'exception interne --- 
    à CrystalDecisions.ReportAppServer.ConvertDotNetToErom.ThrowDotNetException(Exception e) 
    à CrystalDecisions.ReportSource.EromReportSourceBase.GetLastPageNumber(ReportPageRequestContext reqContext) 
    à CrystalDecisions.CrystalReports.Engine.FormatEngine.PrintToPrinter(Int32 nCopies, Boolean collated, Int32 startPageN, Int32 endPageN) 
    à CrystalDecisions.CrystalReports.Engine.ReportDocument.PrintToPrinter(Int32 nCopies, Boolean collated, Int32 startPageN, Int32 endPageN)

在溶液中的任何想法?

配置:C#(2008年),WinForm的,水晶報表10,SQL Server 2008 Express的(本地)

回答

7

沒有用了一下水晶報表,但一般沿着 「登錄異常」 的行錯誤實際上可能與安全無關,Crystal Report錯誤可能有點隨意。

它的可能性可能是與內存問題有關的錯誤。

或者......

它可能會報告特定,子報告也許嘗試使用存儲在報表中,而不是您通過代碼傳遞給它的憑據憑證登錄;您需要遍歷所有子報告,而不僅僅是設置登錄信息的主要報告。

我記得當我使用變通方法爲報表(從另一個數據庫表中的二進制字段中拉出)安裝動態徽標時出現此特定錯誤,除了存在輕微的錯誤,每行數據;在返回一定數量的行之後,它死亡,導致類似的錯誤。

+0

謝謝。我想我找到了問題。子報表的數據源的名稱有一個套管不匹配。 – izokurew 2009-07-06 16:55:59

+0

親愛的菲爾..我不知道如何謝謝。我使用了這個技巧,並在花了4個小時後解決了我的問題。太感謝了。 – 2013-03-20 20:59:30

3

對於有同樣問題的人,還要檢查報表的數據源提供程序是否爲「SQL Native Client」。如果是的話,這將無法在您的生產服務器沒有安裝SQL客戶端。它必須是「SQLOLEDB」,因爲它適用於沒有安裝SQL客戶端的機器。

這就是爲什麼我的報告的工作我測試服務器(其中有SQL Server客戶端)上,並在我的生產服務器不工作

0

如果你有那個用來做工精細的報告,但隨後突然停止工作......你使用的是SQL Server身份驗證...檢查登錄帳戶的密碼過期日期。 :)