Unplanned
Last Updated: 30 Jun 2025 07:42 by ClausDC
Richard
Created on: 25 Jun 2025 09:07
Type: Bug Report
3
NullReferenceException thrown by the WinForms Report Viewer when there is no parent form

When the WinForms Report Viewer is initialized from within the Form.Load Event, and the RefreshReport() method of the viewer is invoked before it is added to a parent form, the following exception will be thrown: 

Telerik.ReportViewer.WinForms.Licensing.UiLicensePresenter.ShowWatermark(Action showWatermarkCallback)
   at Telerik.ReportViewer.Common.TelerikLicensePresenterBase.PresentWatermark(Action showWatermarkCallback)
   at Telerik.ReportViewer.WinForms.WinViewer.OnPaint(PaintEventArgs eventArgs)
   at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer)
   at System.Windows.Forms.Control.WmPaint(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(HWND hWnd, MessageId msg, WPARAM wparam, LPARAM lpa

 

1 comment
ClausDC
Posted on: 30 Jun 2025 07:42
This Exception also occurs when the ReportViewer is hosted in a WindowsFormsHost control in WPF.