Generic performance reports are ones of the most powerful generic reports in SCOM 2007. I like to start from "Performance Top Objects" and "Performance Top Instances" reports. They are the easiest and creating linked reports for them could be quite useful in case where you like to simplify customer experience in searching for objects or instances that are "on top" for a specific performance rule. In most cases the way to simplify the experience is to hard-code the rule in the linked report so the customers won't need to search for it.

If you haven't done this already I highly recommend reading "Linked availability reports" and "Linked reports" posts before continue. They cover some theory behind linked reports authoring. Reading "Report parameters block" and "Report parameter controls" could also be useful in understanding RPDL part of the story.

RuleId, SortOrder and TopCount are parameters that are customizable for "Performance Top" reports. "Performance Top Objects" report also has an additional RuleInstance parameter. This parameter is not valid for "Performance Top Instance" report since the rule instance is the result of the report rather then a filter.

RuleId

This parameter defines the rule report operates on. If you look at the actual report code (RDL file) you find that this parameter is in fact GUID of a performance rule in SCOM management group installation. You may ask me how could I know a GUID of the rule in a particular management group at the time of management pack authoring? The answer is you can't. Instead you should use a special $MPElement syntax which allows referencing of management pack elements by a system name at authoring time. $MPElement reference is resolved and converted to GUID automatically at the time of report deployment. Here is an example:

<Parameter Name="RuleId">
 
<
Value>$MPElement[Name="SQL!Microsoft.SQLServer.2005.NumberDeadlocksPerSecond"]$</Value>
</
Parameter>

SortOrder

This parameter switches report algorithm. Here is the list of possible values:

Top N -1
Bottom N 1

TopCount

This is "N" value for the SortOrder parameter. Specify any positive number here but be reasonable. Setting the value too high can make the report chart unreadable.

RuleInstance

As I said before this parameter only valid for "Performance Top Objects report". It is used in cases where you know an instance or a set of rule instances you like to include in the report filter criteria.

<Parameter Name="RuleInstance">
 
<
Value>A</Value>
  <Value>B</Value>
  <Value>C</Value>
</
Parameter>

Now when we know all these parameters it is a snap to define the lined report. As usually you should not forget about parameter definition for the new report. To simplify the process just copy and paste context of the Microsoft.SystemCenter.DataWarehouse.Report.PerformanceTop.rpdl or Microsoft.SystemCenter.DataWarehouse.Report.PerformanceTopInstance.rpdl. In most cases however you can choose to remove some parameter controls from the block to disallow users changing the parameters you specified. The most common control to disable is the rule picker, but you can choose to remove TopCount and/or SortOrder as well. Here is the complete example:

<LinkedReport ID="Demo.Bottom10DeadlockedDatabases"

        Accessibility="Public" Visible="true" Base="Reporting!Microsoft.SystemCenter.DataWarehouse.Report.PerformanceTop">

   <ParameterBlock columns="2" xmlns="http://schemas.microsoft.com/mom/reporting/2007/ReportParameterSettings">
      <
Controls>
        <Control type="Microsoft.SystemCenter.DataWarehouse.Report.ParameterControl.RelativeDateTimePicker">
         
<
ReportParameters>
           
<
ReportParameter name="TimeZone" binding="TimeZone">
     
        <
Prompt>
Microsoft.SystemCenter.DataWarehouse.Report.Library!Microsoft.SystemCenter.DataWarehouse.Report.ParameterPrompt.TimeZone
              </
Prompt>

           
</
ReportParameter>
           
<
ReportParameter name="TimeZoneName" binding="TimeZoneName" />
           
<
ReportParameter name="StartDate_BaseType"
                             binding
="StartDate_BaseType" />

           
<
ReportParameter name="StartDate_BaseValue"
                             binding="StartDate_BaseValue">

      
       <
Prompt>
Microsoft.SystemCenter.DataWarehouse.Report.Library!Microsoft.SystemCenter.DataWarehouse.Report.ParameterPrompt.StartDateTime
              </
Prompt>

           
</
ReportParameter>
           
<
ReportParameter name="StartDate_OffsetType"
                             binding="StartDate_OffsetType" />

           
<
ReportParameter name="StartDate_OffsetValue"
                            
binding="StartDate_OffsetValue" />

           
<
ReportParameter name="EndDate_BaseType"
                            
binding="EndDate_BaseType" />

           
<
ReportParameter name="EndDate_BaseValue"
                            
binding="EndDate_BaseValue">

      
       <
Prompt>
Microsoft.SystemCenter.DataWarehouse.Report.Library!Microsoft.SystemCenter.DataWarehouse.Report.ParameterPrompt.EndDateTime
              </
Prompt>

           
</
ReportParameter>
           
<
ReportParameter name="EndDate_OffsetType"
                             binding="EndDate_OffsetType" />

           
<
ReportParameter name="EndDate_OffsetValue"
                             binding="EndDate_OffsetValue" />

          </
ReportParameters>
       
</
Control>
        <
Control type="Microsoft.SystemCenter.DataWarehouse.Report.ParameterControl.ComboBox">
         
<
ReportParameters>
           
<
ReportParameter name="ManagementGroupId">
      
       <
Prompt>
Microsoft.SystemCenter.DataWarehouse.Report.Library!Microsoft.SystemCenter.DataWarehouse.Report.ParameterPrompt.ManagementGroup
              </
Prompt>

           
</
ReportParameter>
          
</
ReportParameters>
        
</
Control>
     </
Controls>
   </
ParameterBlock>

  <Parameters>

    <Parameter Name="RuleId">

      <Value>$MPElement[Name="SQL!Microsoft.SQLServer.2005.NumberDeadlocksPerSecond"]$</Value>

    </Parameter>

    <Parameter Name="SortOrder">

      <Value>1</Value>

    </Parameter>

    <Parameter Name="TopCount">

      <Value>10</Value>

    </Parameter>

  </Parameters>

</LinkedReport>