Crystal Reports for .Net Compile Problem – Object reference not set to an instance of an object

Posted: 2013-10-08

Typically you would run into the above exception throughout your code if you haven’t initialized an object before using it. When upgrading a project from the .Net Framework 3.5 to 4.0 I ran into this during the ASP.NET site’s compilation (and, it doesn’t tell you where it occurs).

Basically, find this line in your web.config that Crystal Reports has added and comment it out. Odds are this will fix your problem.

Find this:

    <add extension=".rpt" type="CrystalDecisions.Web.Compilation.RptBuildProvider, CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>

And Make it this (or just delete it):

    <add extension=".rpt" type="CrystalDecisions.Web.Compilation.RptBuildProvider, CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>