cancel
Showing results for 
Search instead for 
Did you mean: 

NullReferenceException when using ExportToHttpResponse

Former Member
0 Kudos

Hi,

I have a .net application where number crystal reports are invoked and generated as PDF through ExportToHttpResponse function. On the current Windows server 2008, all reports are running fine with no problems. We are in the proccess to a newer version Windows Server 2012 R2. After deploying the crystal runtime 32bit on the new server, most of the reports are running with no issues; however some reports are giving NullReferenceException in the EromReportSourceBase.ExportToStream when running them in from the new server. I have compared almost all configuration in the old and new servers and ideally everything is the same. Just to add, the reports that are not working are expecting

DataTable as dataset in subreports.

Error:

[NullReferenceException: Object reference not set to an instance of an object.]

   CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext) +1130

   CrystalDecisions.CrystalReports.Engine.FormatEngine.ExportToStream(ExportRequestContext reqContext) +649

   CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportToStream(ExportOptions options) +98

   CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportToHttpResponse(ExportOptions options, HttpResponse response, Boolean asAttachment, String attachmentName) +98

   CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportToHttpResponse(ExportFormatType formatType, HttpResponse response, Boolean asAttachment, String attachmentName) +123

Error line:

report.ExportToHttpResponse(ExportFormatType.PortableDocFormat, Response, false, "BPA_Report");

Thanks.

Abdullah

Accepted Solutions (1)

Accepted Solutions (1)

former_member183750
Active Contributor
0 Kudos

Hi Abdullah

This is a known issue and it has been scheduled to be fixed in Service pack 13 - ETA; end of January.

Assumption: you are using SAP Crystal Reports, Developer Version for Visual Studio .NET

- Ludek

Senior Support Engineer AGS Product Support, Global Support Center Canada

Follow us on Twitter

Message was edited by: Ludek Uher

Answers (0)