OpsMgr and report parameters not binding


I’m currently involved in some housekeeping for our remotely operated service, we definitely need better alerting reporting, so I started working (after a while) on the reporting section of management packs. While I was working on a brand new report I stumbled in a nasty issue: one of my report parameters won’t bind to the sql reporting service parameter. Just to be clear, as you know OpsMgr has its own UI controls to show report parameters in the monitoring console, these UI controls need to bind to the actual SSRS report parameters. If they don’t bind your input is lost and the report set it to the default value (if any).

This is an example of a simple TextBox control with a bind to a report parameter called "AlertName"

<Control type="Microsoft.SystemCenter.DataWarehouse.Report.ParameterControl.TextBox" 

rowSpan="1" columnSpan="5">

 <ReportParameters>
  <ReportParameter name="AlertName">
    <Prompt>Progel.Report.Library!Progel.Report.ParameterPrompt.AlertName</Prompt>
  </ReportParameter>
 </ReportParameters>
</Control>

In SSRS the report parameter is defined with the following schema, note that the Name attribute must match the UI control report parameter name. Also note the highlighted line, if the tag Hidden is specified regardless of the value the UI control and report parameter won’t match. So if you find yourself with report parameters that don’t match take a look at the report XML to check for the Hidden tag (and eventually remove it).

              <ReportParameter Name="AlertName">
                <DataType>String</DataType>
                <Nullable>true</Nullable>
                <DefaultValue>
                  <Values>
                    <Value>=Nothing</Value>
                  </Values>
                </DefaultValue>                 
                <AllowBlank>true</AllowBlank>
                <Prompt>[AlertName]</Prompt>
                <Hidden>false</Hidden>
              </ReportParameter>

More information on report authoring here: Download the guide.

– Daniele

This posting is provided "AS IS" with no warranties, and confers no rights.

Advertisements
  1. Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: