Reporting is one of the most powerful features of Team System. Any data stored in the data warehouse can be viewed as a report, which enables you to view and organize project metrics very easily. This includes work item tracking (tasks, bugs, and requirements), test results (unit, static, and dynamic tests), quality indicators (performance and code coverage), build reports, schedule reports, and overall project health reports. You can also create customized reports for your clients or business analysts, and the best part is that you don't have to invest a lot of money in third-party tools to get quick and cost- effective results.
The reporting tools are not only useful for project managers, but also for team members in every role. For example, a developer can look at test results and home in on specific bugs. At the heart of the reporting features is SQL Server 2005 Reporting Services. (You will learn more about this feature later in the chapter.)
Team System has many public reports available right out of the box (19 reports duplicated across both MSF for Agile Software and MSF for CMMI Process Improvement process templates). From a project management perspective, one of the great advantages of using Team System is that you don't have to manually correlate data from a host of third-party sources. All reports are available in a tightly integrated fashion within the report site, which is accessible using Team Explorer and through your web browser.
You can access project reports in Visual Studio using the Team Explorer. The reports listed in Figure 19-24 are part of the MSF for Agile Software Development process and can be found in the tree under Reports Public. To view a report, simply click on it; the results will appear in the middle pane.
You can also access the default (and custom) reports using the project portal. In Team Explorer, expand your project and right-click on Reports. To view the available reports, select Show Report Site. You can also manually access the portal by typing the following link in your browser: /Reports/">http://www.<ApplicationTierName>/Reports/. You'll see a page very similar to the one shown in Figure 19-25.
Figure 19-26 illustrates a typical Bug Rates report. As you can see, the Active Bugs Backlog is decreasing at a healthy rate, while the bugs are getting resolved and activated at a constant rate. This particular report indicates that the project is in good health (at least you are effectively finding, fixing, and closing bugs).
Once you have the data, you need to be able to correctly interpret the metrics in order to make high-level decisions for your project. Let's look at a few case studies to get a handle on how data is presented in a report and how to interpret the results. Figure 19-27 shows a typical Velocity report.
The Resolved Bugs rate (represented by the lines with diamonds on the graph) indicates that a variable number of bugs are being fixed. The Closed Bugs Rate (represented by the line with squares) also shows a variable number of bugs being closed. This lack of consistency on the graph indicates that your developers are inconsistently resolving bugs. The problem can be solved by better planning and implementing a formalized methodology on the prioritization and elimination of bugs.
Another example is the Remaining Work report, shown in Figure 19-28.
There is a predominant negative trend indicated on this report. The Active Scenarios Backlog will not be resolved by the end of the project as indicated by the dotted line. Based on this trend, it would be important to re-evaluate the distribution of work, perhaps allocating more personnel to work through scenarios.
A final example is the Unplanned Work report, shown in Figure 19-29.
As you can see in the diagram, there are a number of planned and unplanned work items in play. The amount of planned work is decreasing, which is a healthy trend. However, the darker area representing the unplanned work is also increasing a bit. The report provides a way to figure out in advance what buffer is required to make sure that your team doesn't get overwhelmed.
You can view your project data using an Excel pivot table. One of the key advantages of using a pivot table is simplicity — Microsoft Excel mines the data warehouse directly and has the built-in capability to display rich graphs and charts. (See Figure 19-30 for an example of data imported into Excel.) Here is how you can set up Excel to view your project data:
Open Microsoft Excel.
Select Data PivotTable and PivotChart Report.
Select External Data Source and Pivot Table and then click Next.
Click the Get Data button.
Select the OLAP Cube tab, select New Data Source, and then click OK.
Write a custom name for your data source. (If you are unsure, write in something like TFS- DATA.) To use Pivot Tables, you need to first download the OLEDB 9.0 drivers. If you want to install the drivers without having to install all of the SQL client tools, please refer to this package: http://www.microsoft.com/downloads/details.aspx?FamilyID=&displaylang=en.
If the OLEDB drivers have been installed and you encounter an "Initialization of the data source failed" error, simply go to Start Run, and type Regsvr32 "C:\Program Files\Common Files\System\Ole DB\msolap90.dll."
Select the Microsoft OLE DB Provider for Analysis Services 9.0 and click Connect.
A new window entitled Multidimensional Connection 9.0 will pop up.
Select Analysis Server; under Server, enter (local).
Enter the credentials you used for TFSSETUP in the User ID and Password fields. (The wizard will warn you if your credentials are invalid.) Theoretically, you should not need credentials, but you need to be a member of the TFSDataWarehouseReader role on the cube. You can set this up using the SQL Server Management Studio.
If you enter incorrect credentials or credentials that don't have sufficient permissions to access the cube, you may receive an "error occurred in the transport layer" message. You can avoid the error message by entering valid user names and passwords.
Select the TFSWarehouse database and click Finish.
Select Team System, check Save My User ID and Password, and click Yes. You may get a warning that your user name and password will not be encrypted. The wizard will not allow you to move forward until you accept the warning. It's an important consideration if you are not in a secure environment (i.e., working from a coffee house hotspot).
Click OK in the Create New Data Source dialog box; click OK once more.
Click Finish in the PivotTable dialog box.
At this point, you can select any fields you want to view in the pivot table. Select the items that interest you and drag them into the Pivot Table. For example, you may be interested in seeing ChangeSet information. The information will auto-magically appear in the Excel spreadsheet within the pivot table. You can then save the sheet or choose to manipulate it at will.
Microsoft provides you with a good variety of reports to help you evaluate the health of your project. However, sometimes you will want to create custom reports to view your data in different ways, based on business requirements. The good news is that, like many other parts of Team System, the reporting feature is completely customizable and extensible. All of the default reports included in the process templates are written as Report Definition Language (.rdl) files. These files are defined by an XML-based schema that makes them interoperable with a variety of tools, including Visual Studio. For more information about the Report Definition Language file specifications, please visit the following link: http://www.microsoft.com/sql/reporting/techinfo/rdlspec.mspx.
Of course, you don't need to write low-level XML to create reports. Team System comes with a variety of tools, including the Report Builder, the Report Designer, the Business Intelligence Development Studio (BIDS), and even Microsoft Excel. The Report Designer and the Business Intelligence Development Studio are add-ins for Visual Studio 2005. Once you have created your custom reports, they can easily be bundled with your process template to be redeployed whenever you want to create a new project. Chapter 22 has useful information about how to incorporate reports as documents (also known as work products) within a process template.
Report Builder is a ClickOnce application that is integrated in SQL Reporting Services. It's designed for business analysts and developers who wish to create custom reports quickly and easily. You can launch it by clicking the Report Builder option on the Report Manager menu bar. (You can bring up the Report Manager by right-clicking a project Reports folder in Team Explorer and selecting Show Report Site.)
Before you can access Team System data, you'll have to create a Semantic Model Definition Language (SMDL) model. As complicated as that sounds, creating the model is actually a simple process:
Go to the Home page of SQL Reporting Services. (The URL is /Reports/">http://www.<yourapplicationtier>/Reports/.)
Click the TfsReportDS data source link.
At the bottom of the next page, you will see a button that says Generate Model. Click the button.
You'll then be prompted for a Name, Description, and Location. Name the model "TfsReportDS."
Once you are finished, you are ready to start building a report. Launch the Report Builder by clicking the link from the front page of the Report Manager site. (You can access the Report Manager by right-clicking your Team Project reports folder in Team Explorer.)
Once the application launches, you can choose whether your report is a matrix, chart, or columnar table. Select the "TfsReportDS" model and select your report type; then click OK.
A report template will appear with an area where you can drag and drop data fields onto it. To create a build report, click the Build entity and select the fields you want to appear on the report. You can also drag and drop entities. (Entities are a logical collection of fields and other data type.) You can then save your report by selecting File Save. Once you click Save, you'll have the option of placing your report in any Team Project you want.
You can mix and match the entities and fields to get unique views of your project data — for example, mixing your build data with changeset data.
There are many different ways you can access and view reports in Team System. You can use Team Explorer or the Team Project report site, or use Microsoft Excel templates or pivot tables. Here are the steps you follow to view the report in Visual Studio using the Team Explorer:
Go to the Team Explorer pane.
Select YourProjectName Reports.
Right-click on any project you want.
Select the Open option. The report will open in Visual Studio.
You can also access reports via the Team Project report site. Here are the steps to access and launch the reports in a web browser:
Go to the Team Explorer pane.
Right-click on Reports within one of your projects.
Select Show Report Site.
Alternatively, you can access the report site by clicking Team Show Report Site (note that you have to be connected to your Team Foundation Server for this to work). To learn more about creating reports and fully leveraging the reporting features of SQL Server 2005 Reporting Services, please visit the SQL Server Developer Centre at the following link: http://www.msdn.microsoft.com/SQL/sqlwarehouse/ReportingServices/default.aspx.
The SharePoint project portal and the Team Reporting sites have to be configured separately from the rest of Team Foundation Server. As with Team Foundation Server, you can simply add server groups to the report site to provide easy administration. Or you can opt to add individual users to provide a higher level of granularity in your security approach per report.
You can access the security setting for your site by first opening up the reports site. Right-click on Reports in Team Explorer and select View Report Site. Once the Report Site appears, click on the Site Settings link on the upper-right corner of the page. At the bottom of the new page, you will have the option of configuring site-wide security, configuring item-level role definitions, and configuring system- level role definitions (as shown in Figure 19-31).