I wrote a report for a demo and needed to include the report in a management pack. The SCOM 2007 way for including a report involved adding in the appropriate tags within your MP XML, and then pasting the code from the RDL into the MP. Fairly straightforward but kind of manual. In this scenario, I needed to include the report in a 2.0 schema MP. The SCOM 2007 tags no longer work, however, I believe including the report has actually gotten a little bit easier.
This assumes the report we are trying to include in the MP is already authored and ready to go. Using the Visual Studio Authoring Extensions, add a Reports folder into the solution:
Within the Reports folder, Add –> Existing item…
Browse to the RDL file (switch to All Files (*.*) to see the RDLs or the view will just display management pack fragment .MPX files) and add it to the solution. Next, add a management pack fragment to the report folder as well:
The XML tags are similar to 2007 but slightly different. Rather than including the entire report definition, the solution can now just reference the RDL file.
Different: <ReportDefinition> & <Resources><ReportResource>
Notice the ReportResouce tag has an ID and it references the newly included RDL file. The ReportDefinition tag now just references the ID of the defined ReportResource.
Only one thing left to change. Since the RDL has been added to the solution, it actually creates a copy of the file within the MP solution. The included RDL needs to be tweaked slightly in order to fix the data source. This is the same as 2007, but the nice call out here is that this does not break the original report solution as it leaves that RDL intact.
This just fixes the path to the data source once the report has been deployed to the SSRS server. Now, build the solution. Within the output folder, it will have both an XML and MPB file (assuming you are not sealing). Taking a look at the XML file, it is pretty useless on its own:
It simply reflects the MPX from the VSAE solution. In order to get the report into SCOM, import the MPB file.