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.