Site icon Paul Turley's SQL Server BI Blog

Can I Add Controls to a Reporting Services Report?

I see this question on the forums all the time and thought it was worth a repost here.  Just this week, at least two people on the MSDN forum for Reporting Services have asked how to add radio buttons or check boxes to a report. 

Can this be done?
No, …I mean Yes, …well, sort of.

Many new report designers who have an application development background tend to treat Reporting Services as an app development tool and it’s not.  Although you can embed code into a report, you cannot add controls in the same way that you would in a web form or windows form project.  Report “controls” are known as “report items” and are generally for displaying data, not gathering input.  The report parameters don’t give you explicit control over the way users are prompted for input values and typically display values in a drop-down list.  If you really need to create a custom interface to prompt for parameter values, you can create a custom web form and then use the ReportViewer control or generate a URL string to launch the report, but this is an exception to the standard reporting experience.  You can do a lot of creative things with SSRS but the design approach is much different that application development.  For newcomers I recommend that you pick up a good book on Reporting Services and learn the how the product was designed to function, rather than spending a lot of extra effort customizing it.

 

When I’m asked if it’s possible to do something in Reporting Services, I try to frame the need I one of three categories:

  1. A product feature, something that SSRS was designed to do easily, using the standard design interface and properties.
  2. An advanced feature that the product does well but requires advanced knowledge, scripting or a little programming.
  3. A very creative extension of product features and custom programming, perhaps stretching the limits of the product design.

Here’s a way to add checkboxes to a report that can be used for interactive selection.  The same technique could be used to add radio buttons.  These techniques fit into category 3 in the above list.

Using checkboxes to select/deselect items & choose parameters

Exit mobile version