WPF Report viewer handle error with exception "Object reference not set to an instance of an object"

0 Answers 18 Views
General Discussions Report Viewer - WPF Rest Service
Aleksey
Top achievements
Rank 1
Veteran
Iron
Aleksey asked on 28 Apr 2021, 09:13 AM

Hello,

I'm  using Telerik Reporting version 15.0.21.326 and WPF report viewer with REST services. When my custom report source resolver return null or custom exception I have exception "Object reference not set to an instance of an object" with stack trace:

at Telerik.ReportViewer.Common.RestServiceProxyEngine.<>c.<GetParameters>b__14_0(JsonExceptionData ex)
at Telerik.Reporting.Services.HttpClient.HttpRequestHelper.PostJson[T](String request, HttpClient client, Object value, Func`2 getDefaultValue, IEnumerable`1 formatters)
at Telerik.Reporting.Services.HttpClient.GenericHttpClient.<>c__DisplayClass13_0`1.<PostJson>b__0(HttpClient client)
at Telerik.Reporting.Services.HttpClient.LocalLoginSession.MakeRequest[T](Func`2 action)
at Telerik.Reporting.Services.HttpClient.GenericHttpClient.PostJson[TResult](String action, Object value, Func`2 getDefaultValue, IEnumerable`1 formatters)
at Telerik.Reporting.Services.HttpClient.GenericHttpClient.PostJson[TResult](String action, Object value, Func`2 getDefaultValue, Boolean ignoreSerializableAttribute)
at Telerik.ReportViewer.Common.RestServiceProxyEngine.GetParameters(String clientID, String report, Dictionary`2 parameterValues)
at Telerik.ReportViewer.Common.ReportEngineRenderingController.GetParameters(ParameterCollection paramValues)
at Telerik.ReportViewer.Wpf.ReportViewerModel.ReloadParameters(IRenderingController controller)
at Telerik.ReportViewer.Wpf.ReportViewerModel.RefreshController(Boolean reloadParameters)
at Telerik.ReportViewer.Wpf.ReportViewerModel.RefreshReportCore(Boolean reloadParameters, LogHistoryRecord logHistory) 

Ivan Hristov
Telerik team
commented on 30 Apr 2021, 02:21 PM

Hello Aleksey,

This is a known issue and it is logged in our product backlog for fixing in a subsequent release of our product. I absolutely agree that the error handling can be improved and it's really confusing to the user to reads incorrect exception messages.

No answers yet. Maybe you can help?

Tags
General Discussions Report Viewer - WPF Rest Service
Asked by
Aleksey
Top achievements
Rank 1
Veteran
Iron
Share this question
or