Copy reports between Microsoft Dynamics 365 (on-premises) deployments

 

Updated: November 28, 2016

Applies To: Dynamics 365 (on-premises), Dynamics CRM 2016

The preferred method to copy a report between organizations or deployments is to include the report and any custom entities the report uses in a solution. If you do this, the entity types are mapped automatically by the system. If you choose to manually copy a report to another Microsoft Dynamics 365 deployment, you must change the entity type codes for custom entities referred to in the report.

The type code for a custom entity may be different in different Microsoft Dynamics 365 installations. If your report contains references to a custom entity type code, such as when you drill through to a custom Microsoft Dynamics 365 entity, you must change the type code of the custom entity referred to in your report to the type code of the custom entity on the other system you are deploying the report to.

The entity type code for all default (non-custom) entities is predefined.

&etc=<entity_type_code>. 

The recommended method to refer to the type code is to define a hidden parameter in the report and set its value to the custom entity type code on the original system. After deployment to another Microsoft Dynamics 365 installation, use a SQL statement to set the parameter's value to the type code of the custom entity on that system.

To use a CRM_OTC parameter instead of a hard-coded type code in a drill-through link to Microsoft Dynamics 365

  1. Obtain the custom entity's type code value. To do this, run the following SQL query on the Microsoft Dynamics 365 organization database. Substitute an appropriate organization_MSCRM name. Locate the type code of your custom entity in the result set.

    use <organization>_MSCRM select Name,ObjectTypeCode from dbo.Entity order by ObjectTypeCode
    
  2. In the report, create two report parameters: CRM_URL and CRM_OTC. CRM_OTC should be of type string. The default CRM_OTC value should be set to the value obtained in step 1.

  3. On the report item that should be used for a drill-through link, add the following Value code:

    =Parameters!CRM_URL.Value &"?ID={" & Fields!new_custentityid.Value.ToString() & "}&OTC="+Parameters!CRM_OTC.Value
    
  4. Preview and save the report.

  5. Copy the report to the destination server according to the instructions in the following section.

After you redeploy Microsoft Dynamics 365 from one server to another, you must individually copy custom reports to the redeployed (destination) server.

To redeploy one or more reports

  1. When you copy a report that references a custom entity type code, you should update the definition of the CRM_OTC report parameter to reflect the object type code of the entity in the destination system.

    From the destination Microsoft Dynamics 365 server, open a browser window and go to the source system Microsoft Dynamics 365.

  2. In the Microsoft Dynamics 365 Reports list, select the custom report. On the toolbar, click Edit, and then click Actions. In the Actions menu, click Download Report.

  3. Click Save. Specify a file name when you are prompted, and then save the report to the destination system. A copy of the report now exists on the destination system.

  4. In the browser, go to Microsoft Dynamics 365 on the destination system.

  5. On the toolbar located above the Microsoft Dynamics 365 Reports list, click New.

  6. In the Report:New Report dialog box, fill in the source file location. Also, fill in the Details section of the form.

  7. Click Save and Close.

  8. You can now see your report in the Reports list. You may need to select an appropriate category or entity from the drop-down lists above the toolbar to see the report.

    If you don't want to define a default filter, go to step 13.

  9. Select your report in the Reports list.

  10. On the toolbar, point to More Actions, and then click Edit Default Filter from the menu.

  11. In the Report Viewer dialog box, define the default filter criteria that will be used every time the report runs.

  12. Click Save Default Filter.

  13. Click Run Report.

After the report is tested and works correctly, follow these steps to add the report to context-sensitive lists and forms in Microsoft Dynamics 365.

To add the report to context-sensitive lists and forms in Microsoft Dynamics 365

  1. Select the report in the Reports list.

  2. On the Actions toolbar, select Edit.

  3. In the Report dialog box, fill in the Categorization section according to the following descriptions:

    • Categories: Categorizes the report according to its intended purpose. For example, a sales report can be included in context-sensitive lists and forms in the Sales area of Microsoft Dynamics 365.

    • Related Record Types: Associates the report to specific entities, like an account or contact. The report can be displayed in context-sensitive lists and forms for those entities.

    • Display In: Allows the report to be displayed in context-sensitive forms and lists. You can restrict where the report is displayed by using this setting. If you intend to publish a hidden report, clear the Display In text box.

    • Languages: Associates the report to all or English language only.

  4. Click Save and Close.

© 2016 Microsoft. All rights reserved. Copyright

Community Additions

ADD
Show: