2

I'm having a problem running Crystal Reports on my IIS server. The report is running correctly on my local dev machine. When I try to run the report on the file server, I'm getting the below exception.

I've verified - Crystal Reports is correctly installed on the server as other reports are correctly generated. All of these reports are "simpler" than this problem report. - That it is not a problem with the datatable containing the data to print. The datatable contents on the server is identical to that generating locally.

System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> CrystalDecisions.CrystalReports.Engine.DataSourceException: Failed to load database information. Error in File temp_3652e948-46a9-48bf-bbb6-9762f068a648 5748_6200_{0D262FA7-D0A6-41FC-BC3B-36A36AA9902A}.rpt: Failed to load database information. ---> System.Runtime.InteropServices.COMException: Failed to load database information. Error in File temp_3652e948-46a9-48bf-bbb6-9762f068a648 5748_6200_{0D262FA7-D0A6-41FC-BC3B-36A36AA9902A}.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.FormatEngine.Export(ExportRequestContext reqContext) at CrystalDecisions.CrystalReports.Engine.FormatEngine.Export() at CrystalDecisions.CrystalReports.Engine.ReportDocument.Export()

Configuration

  • ASP.Net
  • Crystal Reports
  • VB.Net / VS2015

Simplified Source code

    dim pURLFileName as string = "outputfile.pdf"
    dim pDfdoCustomers as DiskFileDestinationOptions = New DiskFileDestinationOptions
    pDfdoCustomers.DiskFileName = pURLFileName

    Dim c As New IndividualSchoolMatching
    '
    ' Assign the datatable to the report
    '
    c.SetDataSource( DataTable Object )

    With c
        .ExportOptions.ExportDestinationType = ExportDestinationType.DiskFile
        .ExportOptions.ExportFormatType = ExportFormatType.PortableDocFormat
        .ExportOptions.DestinationOptions = pDfdoCustomers

        .Export()
        .Close()

End With

Update I'm using a TTX file to define the data from the data table.

photo_tom
  • 7,292
  • 14
  • 68
  • 116
  • Verify your db connections parameters in your server. Maybe you are not pointing to the same database or the server can't reach the db you are using in you pc. – Gi1ber7 May 22 '17 at 18:35
  • I've verified that the data table contents locally and on the server are identical. So I don't see how that could be an issue. – photo_tom May 22 '17 at 19:15
  • I'm not talking about the data. I'm talking about db configuration settings on your pc and on the server. The error shown says it has problem loading database information. Maybe a security restriction issue? check this question: https://stackoverflow.com/questions/23902850/failed-to-load-database-information-in-crystal-report-for-visual-studio-2013 – Gi1ber7 May 22 '17 at 19:23
  • Crystal Reports isn't directly accessing the database. I'm doing that separately and passing the resulting datatable to Crystal. – photo_tom May 22 '17 at 19:25
  • Then maybe this might help you: http://erickwidya.blogspot.com/2011/01/crystal-report-2010-failed-to-load.html – Gi1ber7 May 22 '17 at 19:50
  • Looked like a good idea, but it didn't help. – photo_tom May 22 '17 at 20:20
  • Uhmmm.. Check on this... I have the feeling that should be related to: https://stackoverflow.com/questions/13356765/winforms-crystal-report-failed-to-load-database-information-error – Gi1ber7 May 22 '17 at 20:30
  • Does this answer your question? [Failed to Load database information in Crystal Report for Visual Studio](https://stackoverflow.com/questions/23902850/failed-to-load-database-information-in-crystal-report-for-visual-studio) – Khalid Bin Sarower May 23 '22 at 09:43

0 Answers0