SAP Knowledge Base Article - Public

1865556 - Error: Crystal Report object reference not set to an instance of an object

Symptom

  • Running a report in a Visual Studio .NET application sometimes results in the error:

Object reference not set to an instance of an object

  • Stacktrace:

 

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)

   .

   .

 

 

 

Environment

  • SAP Crystal Reports, developer version for Microsoft Visual Studio
  • Microsoft Visual Studio

Cause

  • A Text Object with a formula was positioned beyond the bounds of the design page
  • The returned value sometimes caused the Text Object to grow, thus producing the error at random

Resolution

  1. Add NULL handling to the formula. This may cause extra blank page
  2. Re-position the Text Object within the bounds of the page and set the option "Can Grow" to False

Keywords

TextObject box cangrow crvs cr4vs 2010 2012 pane design , KBA , BI-DEV-NET-SDK , .NET SDK / COM SDK , Problem

Product

Crystal Reports 2008 V1 ; SAP Crystal Reports, developer version for Microsoft Visual Studio