Skip to Content
Former Member
Feb 16, 2011 at 03:35 PM

ReportViewer System.NullReferenceException on MouseMove


I am experiencing this error in the report viewer. I noticed other are experiencing it as well. I thought I would add my information to see if it can help pinpoint the issue.

I am using:

Crystal Reports 2008 SP3 FP3.3

Visual Studio .NET 2008

.NET Framework 3.5

The report viewer is in embedded in a non-mdi form. The ReportDocument object is passed to the form in the constructor and set to the ReportViewer's ReportSource. Then the WindowState is set to Maximized. The error occurs when the report becomes visible on the screen but only if the mouse is moved over the report viewer area. If the mouse is still it does not error, and if the mouse is not over the report viewer it does not error.

I cannot reproduce on other machines, it seems to be happening on just certain ones (all on same version of Crystal)


System.NullReferenceException: Object reference not set to an instance of an object. at CrystalDecisions.Windows.Forms.PageControl.OnMouseMove(MouseEventArgs e) at System.Windows.Forms.Control.WmMouseMove(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ScrollableControl.WndProc(Message& m) at System.Windows.Forms.ContainerControl.WndProc(Message& m) at System.Windows.Forms.UserControl.WndProc(Message& m) at CrystalDecisions.Windows.Forms.PageControl.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Edited by: SBC Programmer on Feb 16, 2011 9:42 AM