It is not a secret that standard way of presenting report parameters in SQL Server Reporting Services does not give you much flexibility. Designing reporting solution for SCOM 2007 we wanted to change that and enable a way reach controls could be used for report parameter selection. Imagine yourself scrolling though a list of all computers in your organization trying to pick a particular one. We didn’t want that to happen…

As you know report parameters are traditionally defined in the RDL file. The RDL file parameter definition contains name, type, list of valid values, default value etc. It also contains parameter presentation attributes like display name and hidden flag. Standard SSRS parameter block layout logic is very simple: visible parameters are rendered in two columns (from left to right then from top to bottom) based on the order of parameters in the RDL file.

In SCOM 2007 we introduced report parameter definition block which provides additional layout and parameter presentation logic. The parameter block definition is stored in the RPDL (Report Parameter Definition Language) file. This file has to be stored in the same folder with the repot and have report name with ".rpdl" extension.

RPDL file is optional. SCOM 2007 will render parameters similarly to standard SSRS parameter block if you do not specify one.

What is inside RPDL file? Let’s take a look. Here is an example:

<ParameterBlock
   
columns="3"
    xmlns="http://schemas.microsoft.com/mom/reporting/2007/
           ReportParameterSettings
">

  <Controls>
    <
Control rowSpan="2" columnSpan="2"
        type="Microsoft.SystemCenter.DataWarehouse.Report.
              ParameterControl.MonitoringObjectXmlPicker
">

      <
ReportParameters>
        <
ReportParameter name="ObjectList" />
        <ReportParameter name="ManagementGroupId"
                        
binding="GroupList" />

      </ReportParameters>
   
</
Control>
   
<
Control
        type="Microsoft.SystemCenter.DataWarehouse.Report.
              ParameterControl.ComboBox
">
      <ReportParameters>
        <ReportParameter name="Threshold" />
      </ReportParameters>
    </Control>
   
<
Control
       
type="Microsoft.SystemCenter.DataWarehouse.Report.
              ParameterControl.ComboBox
">

      <ReportParameters>
        <ReportParameter name="AggregationType" />
      </ReportParameters>
   
</
Control>
  </Controls>
</
ParameterBlock>

As you can see the parameter block XML has a list of parameter controls. This is similar to parameters definition in RDL file. The difference however is that RDL defines parameters while RPDL defines controls to edit the parameter values. Control can manage or use one or more parameters in the underlying report. Controls are defined in a management pack and can have different implementation depending on what platform they are running.

RPDL still uses left to right / top to bottom layout model but you can control how many columns you have and  define if you like controls to span several rows or columns to achieve desired parameters layout.