Report Parameters in Dashboards via URL Parameters
I had a recent question about how to customize the Burndown and Burnrate report to show both tasks and bugs. By default this report only shows tasks. Unfortunately, it’s not very easy to customize the report to change the default from task to both task and bug.
However, you can create a URL to the report that will set the default to both work item types. Here’s how. Let’s say you have a URL to your report that looks something like this:
The following rewrite of this URL will display the same report, but with both Task and Bug selected by default:
http://server/ReportServer/Pages/ReportViewer.aspx?%2fTfsReports%2fDefaultCollection%2fAgile%2fProject+Management%2fBurndown+and+Burn+Rate&WorkItemTypeParam=[Work Item].[System_WorkItemType].%26[Bug]&WorkItemTypeParam=[Work Item].[System_WorkItemType].%26[Task]
The parameter that controls the work items is called WorkItemTypeParam, and it expects values that are from the cube (see my post on Customizing Report Parameters for how to get the actual value to use). When you want to supply more than one value, as here, you need to repeat the parameter assignment once for each parameter value. I’ve highlighted the two instances of the parameter assignment above.
Note: You need to have the %26 in front of each work item type in order for this to work. Reporting Services is very picky—the value you send to a parameter has to match the parameter values exactly. The Burndown and Burnrate report has & characters (%26 when encoded) in front of [Bug], etc., which means that these are key values.