Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

You receive an error message when you try to run, add, publish, or upload a report to Microsoft Dynamics CRM


View products that this article applies to.

Symptoms

You experience one of the following symptoms in Microsoft Dynamics CRM:
  • When you try to run, add or publish a report to Microsoft Dynamics CRM 3.0, you receive the following error message:
    Object reference not set to an instance of an object.
    When you try to run, add, or publish a report to Microsoft Dynamics CRM 4.0, you receive the following error message:
    An error has occurred.
    Try this action again. If the problem continues, check the Microsoft Dynamics CRM Community for solutions or contact your organization's Microsoft Dynamics CRM Administrator. Finally, you can contact Microsoft Support.

    Error code:
    Note To publish a report to Microsoft Dynamics CRM, use the PublishReports.exe tool. By default, this tool is in the following location:
    C:\Program Files\Microsoft Crm\Reports
  • When you try to upload a report that is created in Microsoft Visual Studio 2005 to Microsoft Dynamics CRM, you receive the following error message:
    >MSCRM Application Error Report:

    Error: Exception of type System.Web.HttpUnhandledException was thrown. Error Message: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
    Error Details: Exception of type System.Web.HttpUnhandledException was thrown.
    Source File: Not available
    Line Number: Not available
    Request URL: http://Servername:Port/CRMReports/reportproperty.aspx Stack Trace Info: at System.Web.UI.Page.HandleError(Exception e)
    Note You receive this error message if the DevErrors value is set to On in the Web.config file.
  • When you run a report in Microsoft Dynamics CRM 4.0, you receive the following error message:
    Microsoft CRM Error Report:
    Error Description:
    An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Error Details:
    Exception of type 'System.Web.HttpUnhandledException' was thrown.

    Full Stack:
    [DirectoryNotFoundException: Could not find a part of the path 'C:\Program Files\Microsoft Dynamics CRM\CRMWeb\_resources\reports.config' at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
    Note You receive this error message if the DevErrors value is set to On in the Web.config file.

↑ Back to the top


Cause

This problem can have either of the following causes.

Cause 1

The data source of the report is a shared data source. See Resolution 1 in the "Resolution" section. The data source of the report must be an embedded data source.

Cause 2

The publish.config file contains a reference to a report that does not exist. See Resolution 2 in the "Resolution" section.

Cause 3

The _Resources folder under the Microsoft Dynamics CRM Web site was removed. Or, the Reports.config file in the _Resources folder under the Microsoft Dynamics CRM Web site was removed. See Resolution 3 in the "Resolution" section.

↑ Back to the top


Resolution

Resolution 1

  1. Open the report in Report Designer.
  2. On the Data tab, click the lookup button to the right of the Dataset list.
  3. Click the lookup button to the right of the Data Source list.
  4. Click to clear the Use shared data source reference check box.
  5. Click Edit to the right of the Connection box.
  6. In the Server name box, type the server name. Then, select the authentication method and the correct database name.
  7. Click OK two times.
  8. On the File menu, click Save as.
  9. Save the report on the Microsoft Dynamics CRM server, and then add the report.

Resolution 2

Follow these steps on the Microsoft Dynamics CRM server:
  1. Locate the folder that contains the publishreports.config file. By default, this folder is the following folder:
    C:\Program Files\Microsoft Crm\Reports
  2. Make a backup of the publish.config file.
  3. Open the publishreports.config file in Notepad.
  4. Find the line that contains the report that does not exist. For example, find the line that begins with �<report filename=� pointing to a report that does not exist or that contains misspelled words.
  5. Remove that line, and then save the file.
For more information about how to use the PublishReports tool, click the following article number to view the article in the Microsoft Knowledge Base:
918841 How to manually connect SQL Reporting Services (SRSS) to Microsoft Dynamics CRM 3.0

Resolution 3

If the whole _Resources folder is missing, locate the _Resources folder if you still have a copy, and then put the _Resources folder under the Microsoft Dynamics CRM Web site. If only the Reports.config file is missing, locate a copy of the file, and then put the copy of the file in the _Resources folder. Copies of the folder and of the file are on the Microsoft Dynamics CRM installation media.

↑ Back to the top


Keywords: KB920124, kbprb, kbmbsmigrate, kbtshoot, kberrmsg, kbmbsreports, kbmbscrm40

↑ Back to the top

Article Info
Article ID : 920124
Revision : 6
Created on : 11/24/2008
Published on : 11/24/2008
Exists online : False
Views : 403