locked
redeploying MS CRM 4.0 - Import Organization fails RRS feed

  • Question

  • Hello there, my question has to do with redeploying MS CRM 4.0 according to http://social.microsoft.com/Forums/en-US/crmdeployment/thread/af5fe48e-c255-4a2d-af66-4ee7aff54d73.

    Background info:

    I have two CRM systems/environments: Dev and Production (both single-server deployments): until yesterday they were the same i.e. on Windows Server 2003 + SQL Server 2005 + Reporting Services 2005 + CRM 4 Rollup 9. Both stable and synchronized for months. However, the customer wishes to change the system to Windows Server 2008 + SQL Server 2008 + Reporting Services 2008 for optimal performance.

    Steps followed on the DEV environment:

    - Backup then format the server

    - install Windows Server 2008 Enterprise Edition SP2 (with IIS etc)

    - install SQL Server 2008 Enterprise Edition SP1 (DBengine, Reporting Services 2008, Integration Services)

    - install MS CRM 4.0, temporary organization

    - install Reporting Services Connector component

    - install Rollup 9 (Server + reporting services component)

    up to here, the brand new/empty CRM opens and works fine.

     

    Import Organization:

    Before the 'import organization' I produced a backup file (.bak) from the OrganizationName_MSCRM database of the production environment (because of the most up-to-date data) and I restored it on the new server.

    - Deployment Manager --> Import Organization --> choose database, user mapping --> Import --->... and error!

    The error occurred during the creation of reports. Actually during the creation of 1 specific report as you can see in the log:

    17:24:32|   Info| PublishReportsFromDatabase: Creating report in Reporting Services.  ReportId: {d6d31d81-f575-de11-aeb9-0019bb22900d}, Name: Report_name_here
    17:24:48|  Error| Import Organization (Name=HAU, Id=2ef250b3-334e-df11-bb96-001e2a3ee09e) failed with Exception:
    Microsoft.Crm.CrmReportingException: The Value expression for the subreport ‘subreport1’ refers to the field ‘field_name_here’.  Report item expressions can only refer to fields within the current dataset scope or, if inside an aggregate, the specified dataset scope. ---> System.Web.Services.Protocols.SoapException: System.Web.Services.Protocols.SoapException: The Value expression for the subreport ‘subreport1’ refers to the field ‘field_name_here’.  Report item expressions can only refer to fields within the current dataset scope or, if inside an aggregate, the specified dataset scope.
       at Microsoft.ReportingServices.WebServer.ReportingService2005Impl.CreateReport(String Report, String Parent, Boolean Overwrite, Byte[] Definition, Property[] Properties, Warning[]& Warnings)
       at Microsoft.ReportingServices.WebServer.ReportingService2005.CreateReport(String Report, String Parent, Boolean Overwrite, Byte[] Definition, Property[] Properties, Warning[]& Warnings)
       at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
       at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
       at Microsoft.Crm.ReportingServices2005.ReportingService2005.CreateReport(String Report, String Parent, Boolean Overwrite, Byte[] Definition, Property[] Properties)
       at Microsoft.Crm.Reporting.ReportServer.UploadReport(String path, Byte[] reportDefinition, String name, String description)
       --- End of inner exception stack trace ---
       at Microsoft.Crm.Reporting.ReportServer.UploadReport(String path, Byte[] reportDefinition, String name, String description)
       at Microsoft.Crm.Reporting.ReportServer.UploadReport(Byte[] reportDefinition, String reportId, String name, String description)
       at Microsoft.Crm.Reporting.ReportServer.UploadReport(SRSReport report, String reportId, String name, String description)
       at Microsoft.Crm.Setup.Server.Utility.ReportsUtility.OrganizationPublishReportsScaleGroup(IDbCommand command, Uri reportingUrl, String orgUniqueName)
       at Microsoft.Crm.Tools.Admin.DBImportHelper.RePublishReports(IDbCommand command, String organizationUniqueName, Uri reportUrl)
       at Microsoft.Crm.Tools.Admin.ImportOrganizationInstaller.Import(Guid organizationId, String organizationUniqueName, String organizationFriendlyName, String sqlServerName, String databaseName, Uri reportServerUrl, String privilegedUserGroupName, String sqlAccessGroupName, String userGroupName, String reportingGroupName, String privilegedReportingGroupName, ICollection`1 users, MultipleTenancy multipleTenancy)
    17:24:48|Warning| Attempting to cancel a long running process: ProgressWizard. This might leave the data in an invalid state and the application might not function correctly.

    That report was obviously working fine with SQL Srv 2005... and never the less, I should be able to proceed with the 'import', even if just one report fails.. Instead of that, the entire process just stops..

    Any ideas at all?? 

    thanx in advance..

    Thursday, April 22, 2010 9:23 PM

Answers

  • You should be able to go in to the CRM DB and see what the report XML looks like.  From there you maybe able to modify the report with the editor to make sure that field exists.  Failing that you could get that XML and then delete that report from the DB before doing an Import.

    Just some thoughts.

    Craig

    • Proposed as answer by Craig R Friday, April 30, 2010 4:41 AM
    • Marked as answer by Donna EdwardsMVP Friday, April 30, 2010 1:10 PM
    Friday, April 23, 2010 5:36 AM
  • Craig,

    Indeed I spent some time exploring the XML of the problematic report (database table ReportBase, column BodyText), at the same time I opened the report in Design mode in Visual studio, so by comparing I concluded that I need to perform this sql update operation:

    UPDATE [ORG_MSCRM].[dbo].[ReportBase]
      SET [BodyText] = REPLACE(BodyText, '=Fields!field_name.Value', '=Parameters!my_Parameter_Name.Value(0)')
       WHERE ReportId = 'd6d31d81-f575-de11-aeb9-0019bb22900d'
    GO

    after that, the Import succeeded! :-)

    Note: before that, I had installed Rollup 10 and tried again, but it had failed again..

    Thank you very much for your hint!

    Friday, April 23, 2010 9:26 AM

All replies

  • You should be able to go in to the CRM DB and see what the report XML looks like.  From there you maybe able to modify the report with the editor to make sure that field exists.  Failing that you could get that XML and then delete that report from the DB before doing an Import.

    Just some thoughts.

    Craig

    • Proposed as answer by Craig R Friday, April 30, 2010 4:41 AM
    • Marked as answer by Donna EdwardsMVP Friday, April 30, 2010 1:10 PM
    Friday, April 23, 2010 5:36 AM
  • Craig,

    Indeed I spent some time exploring the XML of the problematic report (database table ReportBase, column BodyText), at the same time I opened the report in Design mode in Visual studio, so by comparing I concluded that I need to perform this sql update operation:

    UPDATE [ORG_MSCRM].[dbo].[ReportBase]
      SET [BodyText] = REPLACE(BodyText, '=Fields!field_name.Value', '=Parameters!my_Parameter_Name.Value(0)')
       WHERE ReportId = 'd6d31d81-f575-de11-aeb9-0019bb22900d'
    GO

    after that, the Import succeeded! :-)

    Note: before that, I had installed Rollup 10 and tried again, but it had failed again..

    Thank you very much for your hint!

    Friday, April 23, 2010 9:26 AM