View Single Post
  #2 (permalink)  
Old 08-03-2007, 03:26 AM
H2o H2o is offline
D-Web Analyst
 
Join Date: Jul 2007
Posts: 246
H2o is on a distinguished road
Default Re: Object reference not set to an instance of an object for crystal reports in .net

This error message appears because there is no virtual directory for the Crystal Reports Web Forms Viewer for the web application's web site.
To resolve this error message, complete one of these steps:
• If the virtual directory for the Crystal Reports Web Forms Viewer exists under the Default Web Site, copy the virtual directory to the web application's web site.
- For Crystal Reports for Visual Studio .NET 2002 (9.1.3300.0) the virtual directory is CrystalReportWebFormViewer.
- For Crystal Reports for Visual Studio .NET 2003 (9.1.5000.0) the virtual directory is CrystalReportWebFormViewer2.
- For Crystal Reports 9 Developer or Advanced editions (9.2.3300.0) the virtual directory is crystalreportViewers.
- OR -
• If the virtual directory for the Crystal Reports Web Forms Viewer does not exist, create the directory using the following steps:
1. On the 'Start' menu, click 'Run', type "inetmgr", and then click 'OK' to load the IIS Manager.
2. Right-click the web site node associated with your web application.
3. Click 'New' and then click 'Virtual Directory'.
4. Click the 'Next' button.
5. Type the appropriate alias from the following list and then click the 'Next' button.
- For Crystal Reports for Visual Studio .NET 2002
(9.1.3300.0) type "CrystalReportWebFormViewer".
- For Crystal Reports for Visual Studio .NET 2003
(9.1.5000.0) type "CrystalReportWebFormViewer2".
- For Crystal Reports 9 Developer or Advanced
editions (9.2.3300.0) type "crystalreportViewers".
6. Browse to the viewer folder and click the 'Next' button:
- For Crystal Reports for Visual Studio .NET 2002
(9.1.3300.0) and Visual Studio .NET 2003 (9.1.5000.0) browse to 'C:\Program Files\Microsoft Visual Studio .NET\Crystal Reports\Viewers'
- For Crystal Reports 9 Developer or Advanced
editions (9.2.3300.0) browse to 'C:\Program
Files\Common Files\Crystal
Decisions\2.0\crystalreportviewers'
7. On the 'Access Permission' dialog box, click the 'Next' button to go to the last screen.
8. Click the 'Finish' button to exit the wizard.
Additional Information
--------------------------
If this error message still appears after creating the virtual directory, perform a Visual Studio .NET repair install to resolve this error.
If the Default Web Site does not exist in IIS, then create the following registry subkeys:
- For Crystal Reports for Visual Studio .NET 2002
Subkey: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic e
s\W3SVC\Parameters\Virtual Roots
Value: /CrystalReportWebFormViewer
Type string: c:\program files\Microsoft Visual Studio .Net\Crystal Reports\Viewers\,,201
- For Crystal Reports for Visual Studio .NET 2003
Subkey: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic e
s\W3SVC\Parameters\Virtual Roots
Value: /CrystalReportWebFormViewer2
Type string: C:\Program Files\Microsoft Visual Studio .Net\Crystal Reports\Viewers\,,201
- For Crystal Reports 9 Developer or Advanced editions
Subkey: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic e
s\W3SVC\Parameters\Virtual Roots
Value: /crystalreportviewers
Type string: C:\Program Files\Common Files\Crystal Decisions\2.0\crystalreportviewers,,201
__________________
H2O

Without us, no one can survive..
Reply With Quote