65.9K
CodeProject is changing. Read more.
Home

Solving the problem of 'Object Instance not created' in asp.net while using Crystal Reports

starIcon
emptyStarIcon
starIcon
emptyStarIconemptyStarIconemptyStarIcon

1.26/5 (9 votes)

Apr 24, 2004

viewsIcon

37150

Solving the problem of 'Object Instance not created' in asp.net while using Crystal Report

http://praveenvenu.co.nr

Introduction

It is easy to use crystal report in VB.NET or C#.Net. But when using Crystal Report in ASP.Net some problems can occur. One of the problems is the error Object Reference not set.......

Why this happens

This happens because you had not set virtual directory for the Crystal Report viewer, so the viewer can not be initialised.

Solution

The solution for this is simple just create a Virtual directory Named CrystalReportWebFormViewer which is pointing to <Visual Studio installled folder>\Crystal Reports\Viewers (Usually it is C:\Program Files\Microsoft Visual Studio .NET\Crystal Reports\Viewers). Now refresh, and your report will run properly.