Share via


How to Use a Textbox Object Picker Control in your Custom Report

So this is a topic I have been meaning to post in a while now and finally made the time/effort to write it up.  This is a scenario that is not documented in the Report Authoring Guide for Operations Manager and I had to go through the reports in the Generic Report Library MP in order to find an example and understand how to include the required logic in my custom report in order to provide a textbox control.  I used this object picker in the “Alert by Alert Name “ report in my custom Management Group Health Management Pack found here -https://blogs.technet.com/b/mgoedtel/archive/2012/01/19/custom-operations-manager-reports.aspx.  This particular report allows you to search on a specific alert that has been generated by an alert rule or unit monitor within a given date/time range. 

First we follow the guidance in the Report Authoring Guide under the section Custom Report Parameters found here - https://technet.microsoft.com/en-us/library/gg697751.aspx to configure the custom report to use the smart parameter block for things like the relative date-time picker, since the report requires a start and end date range to return the records within, and include the snippet of XML code included in the above referenced section for the Date Report Controls.  Lastly, we need to add the following snippet of XML code to add the textbox control in the <Controls> element.  This is where the report also filters on the specific alert name and returns all records that match:

OMReport_TextBoxControl

The tag <ReportParameter name=“AlertName”> is referencing the parameter used in the SQL query and also matches the data field defined in the report (using either BIDS or Report Builder). 

Now when you run your custom report using the textbox control, it will look like this:

AlertbyAlertName_Report

 

And there you have it folks.