SAP Knowledge Base Article - Public

1544651 - Crystal Reports WPF Viewer fails with NullReferenceException when used in a WinForms application


  • WinForms that references a WPF control library
  • Attempt to show the window with the CR WPF viewer results in the following exception

Object reference not set to an instance of an object


Reproducing the Issue

  • Create a WinForm application that references a WPF control library
  • Encapsulates the new Crystal Reports WPF Viewer
  • Run the application


  • Hosting the WPF viewer in a WinForm app was not considered and therefore not tested
  • The CR WPF viewer uses specific WPF Framework APIs that do not work in WinForms



KBA , BI-DEV-NET , BI Software Development Kits (SDKs) - .NET or Other , Product Enhancement


SAP Crystal Reports, developer version for Microsoft Visual Studio