Skip to Content
0
Former Member
Jan 19, 2011 at 10:23 AM

Error connecting to database from Crystal Report

829 Views

Hi,

I am using Crystal report 2008, .NET 3.5 on Windows Server 2008 + SQL Server 2008

I have a batch that generates report (via export) then this batch will send the exported report via email.

I am encountering this error when reading report from BO Server

Error: CrystalDecisions.CrystalReports.Engine.LogOnException: Database logon failed. ---> System.Runtime.InteropServices.COMException (0x8004100F): Database logon failed.
   at CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.Export(ExportOptions pExportOptions, RequestContext pRequestContext)
   at CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext)

While when trying to read the report from physical file within the server, it will give me this error

Error: CrystalDecisions.CrystalReports.Engine.InternalException: Failed to retrieve data from the database.
Details:  [Database Vendor Code: 2812 ]
Failed to retrieve data from the database.
Error in File IAREPORT {92DFCAFC-58AC-4CB3-B9DD-A9565E07088D}.rpt:
Failed to retrieve data from the database.
Details:  [Database Vendor Code: 2812 ] ---> System.Runtime.InteropServices.COMException (0x800002D3): Failed to retrieve data from the database.
Details:  [Database Vendor Code: 2812 ]
Failed to retrieve data from the database.
Error in File IAREPORT {92DFCAFC-58AC-4CB3-B9DD-A9565E07088D}.rpt:
Failed to retrieve data from the database.
Details:  [Database Vendor Code: 2812 ]
   at CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.Export(ExportOptions pExportOptions, RequestContext pRequestContext)
   at CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext)

The report is working in our SIT environment but it is not working in our UAT environment.

I have tried the following:

1) running the batch (that generates the report) in SIT environment to call SIT database

Working fine

2) running the batch (that generates the report) in SIT environment to call UAT database

Will give the above error

3) running the batch (that generates the report) in UAT environment to call UAT database

Will give the above error

4) running the batch (that generates the report) in UAT environment to call SIT database

Working fine

For reading report from BO Server, I have tried viewing the report directly and scheduling the report directly from BO Server and it works fine.

Also I have tried to 'verify database' on the UAT report, but it seems it didn't solve the issue.

Does anyone have any idea how to solve this? Or what could cause this?

Appreciate your help.

Thanks.