on 2025 Apr 05 1:36 AM
My vb.net app contains a CR report that is exported to a .pdf. The report is generated correctly on two computers, but on the third computer it fails with the subject error. The PCs on which the app works are Win10 and Win11, and the one on which it doesn't is Win11, and is a brand new Dell. The app is reporting on data contained in an Azure SQL Server database. How can I debug this problem? My development environment is on the Win11 computer on which the report works. I don't have a development environment on the Win11 computer where I'm encountering the error. Is there a way I can enable error logging in CR? The error I'm logging follows:
2025-04-04 17:56:57 Title: clsMonthlyReports._RunReport
2025-04-04 17:56:57 Message: CrystalDecisions.CrystalReports.Engine.LogOnException: Database logon failed. ---> System.Runtime.InteropServices.COMException: Database logon failed.
2025-04-04 17:56:57 at CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.Export(ExportOptions pExportOptions, RequestContext pRequestContext)
2025-04-04 17:56:57 at CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext)
2025-04-04 17:56:57 --- End of inner exception stack trace ---
2025-04-04 17:56:57 at CrystalDecisions.ReportAppServer.ConvertDotNetToErom.ThrowDotNetException(Exception e)
2025-04-04 17:56:57 at CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext)
2025-04-04 17:56:57 at CrystalDecisions.CrystalReports.Engine.FormatEngine.ExportToStream(ExportRequestContext reqContext)
2025-04-04 17:56:57 at CrystalDecisions.CrystalReports.Engine.FormatEngine.Export(ExportRequestContext reqContext)
2025-04-04 17:56:57 at CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportToDisk(ExportFormatType formatType, String fileName)
2025-04-04 17:56:57 at AIS_Manager.clsMonthlyReports._RunReport(String aReportName, Boolean aShowProgress, Int32 aRunType)
Any help would be greatly appreciated. Thanks
Request clarification before answering.
Make sure the Crystal Reports Runtime for .NET (matching your development version) is installed on that machine. Also, check that the report’s database credentials are being applied programmatically before export—reports that work locally may fail elsewhere if credentials are hardcoded or missing. Finally, verify the target PC has access to Azure SQL (firewall, connection string, and drivers like OLE DB or SQL Native Client).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
1. SAP Crystal Reports runtime engine for .NET Framework (32-bit) version 13.0.33.4485 is installed on both machines. (See "runtime engines" below)
2. The report runs correctly on my development machine (CDS001), as well as a third machine (CDS005), just not the one I'm having trouble with (CDS002). So the credentials handling for the report must be working, no?
3. I'm able to populate the app containing the report in question with all of my customer data from the Azure SQL Server database, so the firewall, connection string, and drivers must all be correct.
I just checked runtime engines installed on all three machines:
CDS001 (dev) 32-bit 13 SP33 ver 13.0.33.4485
64-bit 13 SP33 ver 13.0.33.4485
CDS005 (prod) 32-bit 13 SP27 ver 13.0.27.3480
64-bit 13 SP20 ver 13.0.20.2399
CDS002 (problem) 32-bit 13 SP33 ver 13.0.33.4485I added the 64-bit 13.0.33.4485 to CDS002, but the problem remains.
sorry for the delay. I suggest enabling SQL logging on the DB server and then try to connect and refresh the report to see what the Server is saying why it's failing to connect. The errors are not gererated by CR, CR is simply passing the error from the Client to you...
FYI, SP 38 was just released so I suggest upgrading to the latest version
Hello,
Firstly you should keep your app up to date, SP 37 is available now, you are on a quite old SP... AND NEVER mix SP's, 32 and 64 bit must match same SP level.
You can get from here:
https://help.sap.com/docs/SUPPORT_CONTENT/crystalreports/3354091173.html
The reason to keep up to date is for security fixes as well as DB Client support etc.
Also note, CR for VS will no longer ship 32 bit runtime at the end of this year (2025) so you need to convert your Project to 64 bit.
To log CR database calls see this KBA:
1603398 - How to trace data source connections in Crystal Reports using crlogger? [Video]
The error message you are getting is being returned from your DB Client, CR is simply passing the error info through from the Client. Logging CR likely won't give you any more info.
You need to debug from the Server to see why it's failing to connect.
Try using an Admin Account, that usually works, if it doesn't it due to connection values.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.