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


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"/>

Leave a comment

Please note that we won't show your email to others, or use it for sending unwanted emails. We will only use it to render your Gravatar image and to validate you as a real person.