16. July 2010 13:42
The bug work item has 3 (Agile: Active, Resolved, Closed) or 4 states (CMMI: Proposed, Active, Resolved, Closed). Those states are used also in the reporting. When you use additional states you will see that the colors are not in the trend that the default states have. Also the order of the states might not be in the correct order. The last requirement I have in this case (because this bug work item has 10+ states) is to aggregate some states into categories to see less states.
This post shows you have you can achieve these requirements.
In order to support the new states in the report, you have to change the rdl.
- Go to http://msdn.microsoft.com/en-us/library/ff730838.aspx to find out how you can start up a new Visual Studio project to modify the report
- Now download the Bug Status (you can find the instructions how to do that in Reflect the rename of a state for the Bug Work Item)
- And add the Bug Status report to the project
- Open the report by double clicking it. You will see something similar like this
- First we are going to solve the coloring
- Now right click on the orange / blue area to open the context menu for the data series
- Choose for the Series Properties
- And go to the Fill section
- Now click on the fx button to open the expression for the color
- You see the list of states and its colors. The color is specified as (Transparancy, Red, Blue, Green). The transparancy of 80 means (because it is a Hex value) 50%. Play around with colors to get the result you want.
- Now we also need to change the sorting of the states
- To do that click on the data series again and scroll completely to the right
- You see that there is a window shown with the Chart Data.
- Click on the triangle in the Series Groups
- And choose the “Series Group Properties…”
- Go to the Sorting section
- Click on the fx button to change the sort by expression
- Again you can modify this expression to get the correct sorting. The !1, !2 and !3 are just textual values to ensure that they are alphabetically sorted before Active, Assigned and so on.
The third modification you might want to make is to aggregate a few states. If you want to do that, you should change the value for the Series Groups from System_State to an expression.
16. July 2010 13:20
The bug work item has 3 (Agile: Active, Resolved, Closed) or 4 states (CMMI: Proposed, Active, Resolved, Closed). Those states are used also in the reporting. When you rename the state, it is not automatically picked up by the reporting. Luckily Microsoft has foreseen that not everybody uses the same name for states and introduced a parameter.
To reflect the new state name in the report (in this post, I assume that you have renamed the state Active to Assigned), you have to change the value of the parameter. You can do that by following these steps (I use SQL Server 2008 R2):
- Go to the report site for the team project (you can find that by right clicking the Reports node in the team explorer)
- It will lead you to the following site
- Click on the Bugs. It will open all the reports that are in the Bugs folder
- Now hover over the Bug Status report and click on the triangle that pops up. This will open a menu of actions you can perform on the report
- Choose the Manage action, which leads to the following page
- Click on the Parameters section (on the left side). You will see the parameters that are specified in the report including there default values
- In the list is also the parameter ActiveName, which defines the name of the state Active.
- Because we changed the Active state to Assigned, you have to change the Default Value to “Assigned”.
- Now scroll down until you see at the bottom the Apply button (don’t forget that one!!)
- The report will now pick up the new state. However there is a little bug in the report. There is one location in which the “Active” state is still hard coded.
- Go back to the action menu that you saw in step 4 and now choose the Download action.
- Download it to your local harddrive.
- Open the rdl file in notepad.
- Replace all occurrences of “Active” (including quotes) with the value Parameters!ActiveName.Value
- Save the changes and go to the page you see in step 5
- Now choose the Replace action and choose the local file
- And press OK.
16. July 2010 12:54
I have a TFS 2010 demo box on Windows Server 2008 R2 and SQL Server 2008.
While I was busy in a team project based on the default Agile or CMMI process template, I saw in the Bug Status report something strange. Although I had bugs assigned (of course it was a demo environment, because I never deliver bugs in real life :) ), the chart that should have been shown was not drawn.
So I went into the data warehouse to confirm that the data was correct and I even added a column to the tablix as a double check
And it confirmed what I already thought: the data is correct. So why is the report not showing?
First I updated my SQL Server to the latest version (SQL Server 2008 R2), but that did not make any difference.
Another few hours of trying and modifying did not solve it. I couldn’t get the hang on it. Until I had help from John Socha-Leialohawho was able to solve the issue. What he did is the following:
- Download the report from the Reporting site
- Open the report in BIDS(the screen shots in this example are from BIDS for SQL Server 2008 R2, so might be slightly different if you use another version)
- Select the chart by clicking on it
- Right click on the chart to open the context menu
- Choose “Change Chart Type” from the context menu
- You will see that the stacked bar is chosen
- Change the chart type to the Bar chart type
- And press OK
- Now change the chart type back to “Stacked bar”
- Follow the same steps for the Resolved Bugs chart.
- And upload the report to the reporting site again (be aware the when you look at the report on the Report site, that it is using a cached report. Just use other parameter values to use the new layout)
And here is the new report that shows the correct result.