Skip to Content
0
Former Member
Jun 05, 2012 at 04:39 PM

Failed to load database information. Error in File [rpt_file_name] {GUID_value}.rpt

1385 Views

Hi All,

I have a problem where I can execute a report in my WCF 4 REST service when I run the project in Visual Studio's built in web server, but it fails when I deploy the application to my local IIS server (or run the project using IIS from Visual Studio) with the following error:

Failed to load database information.

Error in File property_summary {7FFAB7ED-31BD-4E7F-94FA-10B0BB55B111}.rpt:

Here is the software installed on my machine:

  • Crystal Reports 2011
  • SAP Crystal Reports runtime engine for .NET Framework 4 (64-bit)
  • SAP Crystal Reports, version for Visual Studio 2010 (SP1, I think)
  • Visual Studio 2010 Pro, SP1
  • Oracle 32 bit client, Admin install type, 11.2.0.1
  • Windows 7 Pro (64 bit) with IIS 7.5

Here is a snippet of my code:

ReportDocument rptDoc = new ReportDocument();

rptDoc.Load(pathToRptFile);

SetReportParameters(rptDoc, reportParameters);

rptDoc.SetDatabaseLogon(credential.Username, credential.Password);

ExportFormatType rptExportFormat = GetRptFormatType(queryParameters, ExportFormatType.PortableDocFormat);

Stream resultStream = rptDoc.ExportToStream(rptExportFormat);

Message resultMessage = WebOperationContext.Current.CreateStreamResponse(resultStream, ReportExportTypeToMimeType(rptExportFormat));

return resultMessage;

Here is detailed error message with stack trace:

2012-06-05 09:55:49,529 ERROR MyNamspace.ReportService (GetReport(), line:50) - Failed to load database information.

Error in File property_summary {7FFAB7ED-31BD-4E7F-94FA-10B0BB55B111}.rpt:

Failed to load database information.

CrystalDecisions.CrystalReports.Engine.DataSourceException: Failed to load database information.

Error in File property_summary {7FFAB7ED-31BD-4E7F-94FA-10B0BB55B111}.rpt:

Failed to load database information. ---> System.Runtime.InteropServices.COMException: Failed to load database information.

Error in File property_summary {7FFAB7ED-31BD-4E7F-94FA-10B0BB55B111}.rpt:

Failed to load database information.

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

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

--- End of inner exception stack trace ---

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

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

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

at CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportToStream(ExportOptions options)

at CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportToStream(ExportFormatType formatType)

at MyNamspace.ReportService.GetReport() in C:\projects\MyProject\ReportService.cs:line 50


I've seen discussions which talk about issues with 64 bit ODBC drivers (need to use 32 bit drivers - http://scn.sap.com/thread/1984779) and some issue with MS changing the way SQL Server connects in .NET 4, but those issues don't seem applicable to my case.

Does anyone have any suggestions?

Thanks in advance,

Carl