Microsoft Dynamics 365 offers a flexible reporting solution that uses SQL Server Reporting Services to allow users and solution developers alike to build custom reports. The best practice for organizing custom reports is to create what is called a custom Report Category and assign it to our reports. This presented a difficulty when moving these reports automatically as part of a solution.
Before we look at the challenge, let’s look at the setup.
We have a custom Report Category (note, you can view your system’s Report Categories under Settings > Administration > System Settings and choosing the Reporting tab):
Before we deploy our solution, we have given custom reports this category:
We have created a report table view which we use to display only custom reports in the MDA, effectively hiding all “out-of-the-box” reports by default:
The tricky part? There seems to be no way to move these categories between systems, either through a solution or automatically using the user interface.
After a bit of investigation - and trial and error - this field is seemingly a special Option Set on the hidden system table “Report Related Categories” (which you will see in the filter above).
I had an idea to try the XRMToolbox tool Option Set Editor and it worked perfectly.
Using this tool, go to the source system, choose this table, choose field Category, Export to CSV, connect to the destination system, navigate, and Import from CSV:
Any custom report categories and their underlying values are now in the target system’s settings.
I also discovered this must be completed as a step prior to installing the solution. If not already present, reports in the solution will not correctly associate to the category. This is very important when working with Unmanaged Solutions as reports would need to be manually deleted before trying the import again (for Managed Solutions, the solution simply needs to be uninstalled and reinstalled with the category present).
While not perfect, as it would be ideal to have one solution perform all the steps, it is the best practice solution we found until categories can be moved via solution.