cancel
Showing results for 
Search instead for 
Did you mean: 

CR runtime for VS2010 (v13) not generating report

Former Member
0 Kudos

I installed Crystal Reports Runtime for VS2010 version 13 on Win2003 Server 64 bit (for intranet website that is used to execute reports). The web site is executed under Integrated security. The user account and the network service account have write and modify access to the designated temp folder on the web server. But for some reason when I execute the report, "Database Logon Failed" error is getting generated. Crystal Reports 10.5 runtime under same settings worked fine, but when I installed CR13 runtime and changed Web.config to point to CR13 version, it is generating this error. The correct version 13 is getting picked up as I checked the ReportDocument object's Class Version after the ReportDocument.Load() is executed, and it points to version 13. It is generating this error when executing " ReportDocument.ExportToDisk". Does any account other than the user account (logged in NT account) and service account require permissions to temp folder. Does any other folder require permissions? What is new in version 13 regarding the temp folder that CR uses to generate the report? The temp folder that is used in our intranet web site to generate CRs is a special folder (not C:\Win\Temp but another designated folder) that has the user account & Network service account have write and modify access. Has anything regarding the temp folder that CRs uses changed between CR10.5 and CR13. The web site, Crystal Reports(.rpt) and SQL server (Network is set up for Kerberos Authentication) are all set up for integrated security, and this set up worked with CR10.5 runtime, but does not work with CR13 runtime.

Error Details:

Server Error in '/' Application.

Database logon failed.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Runtime.InteropServices.COMException: Database logon failed.

Accepted Solutions (1)

Accepted Solutions (1)

former_member208657
Active Contributor
0 Kudos

The message may be telling you what to check out first - your database. I suggest using your database admin tools to monitor your database while you attempt to run the report and see which user account is attempting to logon.

Regarding the temp directories - I don't think the error you are seeing is due to temp directory access. You'd be getting Load Report Failed, or something of the sort, long before a database logon error. To be sure you can use Process Monitor to see what is going on in your temp directory. You'll probably see a bunch of .rpt files in your temp directory that we create. If those are created without error then it won't be a temp directory issue.

You'll also want to ensure you are running your process under a domain account that has permissions to authenticate your impersonated users. If you are using a local account it won't have the domain rights to check the users against the domain controller. There is a bunch of delegation configuration you need to do to get that work correctly.

Former Member
0 Kudos

Thank you, the web site app pool is running under Network Service account. Before installing CRRuntime_13 on Win2003 SRV, the same web site code set up for integrated security was working with CRRuntime_10.5 with the app pool running under network service account. I checked with our NT folks to confirm that the Kerberos delegation is set up correctly. The .rpt & tmp files with the GUID are being created in the temp folder, but the ExportToDisk routine fails. Code that executes a stored proc that populates tables (to which the CR fields point to) with underlying data for the report is executed successfully under integrated security, the connection in the crystal report (RPT) is also successfully set to integrated security, but fails when executing the ExportToDisk routine. Both the stored proc execution code and CR set connection to integrated secdurity code get executed before ExportToDisk routine gets executed. The connection that is created in the crystal report rpt file uses OLE DB provide for SQL Server. I am still not able to figure out what the issue is. Does the NT account that gets impersonated require any permissions like Allow log on Locally or other permissions to be able to generate report successfully? Any leads on this issue would greatly be appreciated. Thanks.

former_member208657
Active Contributor
0 Kudos

It sounds like you are seeing an erroneous database logon error message because you indicated the stored procedure is triggered. I would suggest using a combination of both Process Monitor and our crpe logging to get a hint at what is going on in this case.

Process Monitor will give you an idea of any file or registry permissions type issues you are running into. And the crpe logging will tell you what is going on with the Crystal reporting engine. See the kbase below for info on crpe logging.

I'd also suggest trying some blank reports, or ones that don't use trusted auth and impersonation. It might help you narrow things down.

1470978 - How to enable/disable crpe logging for the Crystal Reports .NET SDK

Former Member
0 Kudos

I have the same issue as you. I have converted my reports from CR10 to CR13. I can execute them locally (I'm in "Administrator Group"), but when I deploy the reports to my DEV environment I have this error :

CrystalDecisions.CrystalReports.Engine.LogOnException: Echec de la connexion à la base de données. ---> System.Runtime.InteropServices.COMException (0x8004100F): Echec de la connexion à la base de données.

à CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.Export(ExportOptions pExportOptions, RequestContext pRequestContext)

à CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext)

--- Fin de la trace de la pile d'exception interne ---

à CrystalDecisions.ReportAppServer.ConvertDotNetToErom.ThrowDotNetException(Exception e)

à CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext)

à CrystalDecisions.CrystalReports.Engine.FormatEngine.ExportToStream(ExportRequestContext reqContext)

à CrystalDecisions.CrystalReports.Engine.FormatEngine.Export(ExportRequestContext reqContext)

à CrystalDecisions.CrystalReports.Engine.FormatEngine.Export()

à CrystalDecisions.CrystalReports.Engine.ReportDocument.Export()

à

I don't understand how it could be a database connection problem, because the report crash on CrystalDecisions.CrystalReports.Engine.ReportDocument.Export() call and, at this point, data are loaded into the dataset from my Data Tier (which did not fired an exception).

Former Member
0 Kudos

I restarted my IIS application pool and this action resolve the problem. I tried this solution with another project, following those steps:

1 - Compile the solution using the new CR13 references

2 - Deploy the package to the DEV environment

3 - Try to export one of my reports (and it crashed like I mentioned earlier)

4 - Restart the application pool that contains my Web application

5 - Retry to export the same report, and it worked.

So, try to restart your IIS application pool.

Answers (0)