Custom TFS Warehouse reports and dev \ efor
Posted March 12th, 2009 by ErsanHello,
As we all know, we can build custom reports from TFS warehouse by using Microsoft SQL Server BI Studio.. In this post, i’ll go for a walkthrough about custom TFS Warehouse reports and how dev \ efor TFS cube will provide code & effort metric values in your team projects in TFS.
First of all, let’s open BI studio..
after BI studio is open, let’s create a new project
create new project menu comes.. let’s select report server project

a new report server project is created. Now, let’s add a new shared data source for our project

Shared data source screen appears… because we’ll be working with TFS Warehouse, let’s select Microsoft SQL Server Analysis Services as Data Source Type. Then, click edit for select TFS Warehouse Server connection information

Enter your server name information ( yout data tier server name) and then, select TfsWarehouse as database

Click ok to close both menus. Then, turn back to solution explorer to add a new report… right click reports folder and select new item

Select reports to add a new report

Now, let’s pick our dataset for our custom report

When we pick new dataset, the cubes from TFS Warehouse appears… click on [...] button next to Build cube to see additional cubes

You’ll see the all cubes in your warehouse. In this walkthrough, of course we’ll pick dev efor cube :)

Expand Measures, you’ll notice there are two kind of measures we do. Code & Effort metrics.. for the sake of simplicity, i’ll just build a custom tfs report which shows trend of lines of code for a team project…

Therefore, i pick Team project and drop it to query result area, i pick date and from measurement, i pick lines of code…
I want to filter this query, therefore i add a filter expression. I want to see the team project named “FirstTeamProject”

Now my data is ready, i switch the layout view and add a chart for my report to be more visual.

From my dataset fields, i drop Lines of Code team field and Date to category field
The default chart type is bar chart but we want to see the trend, therefore, let’s change chart type to line.. I pick smooth line

In addition, i want to see the point labels on my trend, so.. i right click to my chart and click properties

From data tab, click edit for Lines of Code team value

Edit Chart Value menu appears, select Point Labels Tab and click Show point labels…
From Data Label CheckBox, enter the expression value for trend labels

Click OK to close menus and turn back to your report…
Click Preview to see your report…

Voila. Let’s deploy this report to our report server….

Thats it. You can access this report from SSRS web site.
Of course, we’ll provide you very detailed reports out-of-box with dev \ efor TFS integration. For instance, our solution based code metrics report looks like this

Well, i hope you enjoyed this walkthrough. We use dev \ efor for a while in-house and we want to make sure we will provide you a stable release. Soon we’ll pack it up and notify you… You’ll hear from us one of these days :)
Cheers !
Ersan.



Leave a Reply