Reports in Management Packs.


In my previous post “Authoring reports for SCOM 2007” I said that there are basically tree ways to author new reports for SCOM 2007. Create a linked report, use Report Builder or create a custom report using Visual Studio. The best way to introduce a new report in the system is to include it in a Management Pack (read “SCOM 2007 Report Catalog” post for details).


Any Management Pack (MP) can contain reports. If you have RDL file you can simply paste it content under Reporting/Report/Definition node in the MP.


Here is an example:


<Reporting>


  <Reports>


    <Report ID=Demo.MyReport Accessibility=Public Visible=true>


      <Definition>


        [Paste content of the RDL file here…]


      </Definition>


    </Report>


  </Reports>


</Reporting>


 


ID is the name your report is deployed under to the SSRS. ID is also a reference for your report inside the Operations Manager. It has to be unique inside the MP and if you specify Accessibility=Public other management packs could reference your report if they like to use it as a drill-down or as a sub-report.


Your report is going to be visible inside the catalog if you set Visible totrue. Specify false if you author a sub-report or a drill down report that you don’t like to be a part of the list of reports users can run directly.


That’s it! Your report is ready to go. To complete the picture however you probably want to give you report a friendly name. That name is displayed in the console when user clicks on your management pack inside the Reporting navigation tree.


To give your report a friendly name you need to define a display string inside the management pack and target it to your report ID.


<LanguagePacks>


  <LanguagePack ID=ENU IsDefault=true>


    <DisplayStrings>


      <DisplayString ElementID=Demo.MyReport>


        <Name>My Report</Name>


        <Description>My First SCOM 2007 Report</Description>


      </DisplayString>


    </DisplayStrings>


  </LanguagePack>


</LanguagePacks> 

Comments (7)

  1. Eugene Bykov says:

    In SCOM 2007 we tried to make out of the box reports as generic and as configurable as possible. The

  2. AgentM says:

    Eugene,

    I am trying to insert some reports in my MP.

    I created a report in VS then copied the xml from the rdl file. When I run the report from the console it fails because it cannot find the DataSource.

    The datasource in the rdl is defined at

    <DataSource Name="OpsMgrDW">

         <DataSourceReference>OpsMgrDW</DataSourceReference>

         <rd:DataSourceID>f669bd41-9d46-4318-877a-e9af08ec0733</rd:DataSourceID>

         <rd:SecurityType>None</rd:SecurityType>

       </DataSource>

    How do I find out what are the right values for the datasource ?

    Thank you.

  3. eugenebykov says:

    Shared data source pointing to DW main dataset should be defined exactly like this:

       <DataSource Name=”DataWarehouseMain”>
         <rd:DataSourceID>e4235c51-407f-4065-8519-a1e57374bc45</rd:DataSourceID>
         <DataSourceReference>Data Warehouse Main</DataSourceReference>
       </DataSource>

    Management Pack deployment process uses these names for report uploading and configuration.

  4. seajhawk says:

    Don’t forget, before you paste in the contents of your RDL file remove the first line that has the xml version and encoding information.

    It looks like this:

    <?xml version="1.0" encoding="utf-8"?>

    -Chris

  5. Face says:

    What if the SQL Query i based on the OPSMgr Database.  Can you elaborate on what the Data Source Name would be in that scenario?

    <DataSource Name="DataWarehouseMain">

        <rd:DataSourceID>e4235c51-407f-4065-8519-a1e57374bc45</rd:DataSourceID>

  6. Ravi says:

    What if I want to add multiple reports.

    I get the following error when I import the MP:

    This management pack cannot be imported.

    : Verification failed with 1 errors:

    ——————————————————-

    Error 1:

    Found error in 2|UnknowMP|1.0.0.0|UnknowMP|| with message:

    XSD verification failed for the management pack. [Line: 0, Position: 0]

    System.Xml.Schema.XmlSchemaValidationException: The element 'LanguagePack' has invalid child element 'DisplayStrings'. List of possible elements expected: 'KnowledgeArticles'.

      at System.Xml.Schema.XmlSchemaValidator.SendValidationEvent(ValidationEventHandler eventHandler, Object sender, XmlSchemaValidationException e, XmlSeverityType severity)

      at System.Xml.Schema.XmlSchemaValidator.ValidateElementContext(XmlQualifiedName elementName, Boolean& invalidElementInContext)

      at System.Xml.Schema.XmlSchemaValidator.ValidateElement(String localName, String namespaceUri, XmlSchemaInfo schemaInfo, String xsiType, String xsiNil, String xsiSchemaLocation, String xsiNoNamespaceSchemaLocation)

      at System.Xml.XsdValidatingReader.ProcessElementEvent()

      at System.Xml.XsdValidatingReader.Read()

      at Microsoft.EnterpriseManagement.Configuration.XSDVerification.ValidateManagementPack(TextReader mpcontents, ManagementPack mp, Boolean throwError)

    ——————————————————-

  7. Ravi says:

    Nevermind, solved my own issue.

    Thanks.