Symptom
- Building a Visual Studio .NET 2008 web project
- Error Object reference not set to an instance of an object
Reproducing the Issue
- Create a new web project in Visual Studio .NET 2008.
- Add a Crystal Report to the project.
- Build the project.
- The error Object reference not set to an instance of an object is displayed.
- Visual Studio .NET 2008
- Crystal Reports 2008 SP1, with FixPack 1.5
Cause
The error is caused by a Crystal Decisions build provider in the web.config file
Resolution
- Open the web.config file in your project.
- Comment out, or delete, the following section:
<add extension=".rpt" type="CrystalDecisions.Web.Compilation.RptBuildProvider, CrystalDecisions.Web, Version=12.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
Your <buildProviders> section should now look like this.
<buildProviders><!--<add extension=".rpt" type="CrystalDecisions.Web.Compilation.RptBuildProvider, CrystalDecisions.Web, Version=12.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>--></buildProviders>
For any version of the viewer change 12.0.2000.0 to the current version, for example 13.0.2000.0
Keywords
Object reference not set to an instance of an object , KBA , BI-DEV-NET , BI Software Development Kits (SDKs) - .NET or Other , Problem
Product
Crystal Reports 2008 V1 ; SAP Crystal Reports, developer version for Microsoft Visual Studio