DevExpress 16.2.1 上的 NullReferenceException 通过 WebForms 上的 ReportService 生成 XtraReport

NullReferenceException on DevExpress 16.2.1 XtraReport generation via ReportService on WebForms

DevExpress 2016 ver.1.2 中使用 ReportService 作为 AspxDocumentViewer 的报告提供程序时 "Object reference not set to an instance of an object" 在浏览器中显示为 JS 警报正在尝试显示报告。

捕获到的内部异常有下一个信息:

Object reference not set to an instance of an object.
    at DevExpress.XtraReports.Web.Native.ReportRenderHelper.GetPreparedOptions() 
    at DevExpress.XtraReports.Web.Native.DocumentViewer.RemoteReportRenderHelper.CreatePageWebControl(IImageRepository imageRepository, Int32 pageIndex)
    at DevExpress.XtraReports.Web.Native.ReportRenderHelper.WritePage(Int32 pageIndex)
    at DevExpress.XtraReports.Web.Native.DocumentViewer.DocumentViewerReportWebRemoteMediator.<>c__DisplayClass2.b__1(PrintingSystemBase printingSystem)
    at DevExpress.XtraReports.Web.Native.DocumentViewer.DocumentViewerRemoteHelper.DoWithRemoteDocument[T](Byte[] bytes, Int32 pageIndex, Int32 pageCount, Func`2 func)
    at DevExpress.XtraReports.Web.Native.DocumentViewer.DocumentViewerReportWebRemoteMediator.GetPage(ReportViewer viewer, RemoteDocumentInformation documentInformation, Int32 pageIndex)
    at DevExpress.XtraReports.Web.Native.DocumentViewer.DocumentViewerReportViewer.CallbackRemotePage()\r\n   at DevExpress.XtraReports.Web.ReportViewer.GetCallbackResult()
    at DevExpress.XtraReports.Web.ASPxDocumentViewer.GetCallbackResult()
    at DevExpress.Web.ASPxWebControl.System.Web.UI.ICallbackEventHandler.GetCallbackResult()

在小型调查中,我注意到在请求内部 DevExpress 代码中某处的 ReportService.GetPages 方法后报告生成崩溃。

注意,使用 DevExpress 15.2.7 同样的解决方案可以正常工作,所以这是两个版本之间的某种重大更改。

当报告直接设置为 AspxDocumentViewer.Report(不使用 ReportServiceClientFactoryReportService)时,相同的解决方案也适用于当前版本,因此它似乎是 ReportService问题。

ASP.Net WebForms应用,报表尽可能简单(空,无数据使用)。

在 DevExpress 站点上创建 ticket,它附有示例应用程序以重现问题。

When using ReportService as report provider for AspxDocumentViewer in DevExpress 2016 ver.1.2 "Object reference not set to an instance of an object" is shown as JS alert in a browser when trying to show report.

我看到您使用的是 alpha 版本 (2016 ver.1.2)。 据我所知,这个问题已经 fixed with maintenance update 16.1.5 于 2016 年 8 月 2 日发布。
因此,升级 DX Suite 以解决此问题。