Skip to Content
0
Former Member
Dec 23, 2010 at 09:37 PM

CR2010 Win Form - Preview crashes with Object Reference - MouseMove event

148 Views

We have a few users in our firm reporting the error when the go to view a Crystal Report

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.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)

This is happening on some users machines, but not on all reports (invoices in our case). They can view some invoices, while others crash. On other users machines, these invoices load fine.

All have installed CR Redist 2010 and the project has been updated to CR 2010.

Our code to create this is the following - although I'm not sure the code really matters as why does it crash on some and not others?

Dim cr As New ReportFiles.crInvoice


      dt = GetReportData(mClientNo, mSeqNo)
      cr.SetDataSource(dt)

....

'update some data definitions fields ex
cr.DataDefinition.FormulaFields("DatePrinted").Text = "'" & Format(tmpDate, "d MMM, yyyy") & "'"

CRViewer.ReportSource = cr

What could possibly be different between the 2 computers that would cause this crash?

Thanks