Team Foundation Server includes a reporting component that allows you to monitor and analyze the progress of your project.
Reports you create can include data retrieved from one of the following data sources:
-
Work item queries
-
Online analytical database
-
Relational warehouse database
Depending on which report data source you choose, you can use one of the following tools to create reports:
-
Microsoft Excel
-
Report Builder
-
Report Designer
The results generated by AQTime projects included in team builds do not differ from the results generated by other Visual Studio items. So, you can create a report for these results in the same manner you create other reports in Visual Studio.
This topic describes how to use Report Designer to create reports that include AQTime project results retrieved from a relational warehouse database (TFS_Warehouse). For information on how to create reports that retrieve data from other data sources, see the Team Foundation documentation in the MSDN library (the online version is available at http://msdn.microsoft.com).
To create reports, you must have SQL Server Business Intelligence Development Studio installed on your computer. Also, your Team Foundation Server reporting component must be configured. |
1. Creating a Report
To create a report, you should first create a project that will hold the report. To create a new report project:
-
Select File > New > Project from Visual Studio menu. This will call the New Project dialog.
-
Select Business Intelligence Projects from the Project type tree on the left of the dialog. In the Templates box, click Report Server Project.
-
Specify the report project name and location.
-
Click OK. Visual Studio will create a new report project and display it in the Solution Explorer.
To create a new report:
-
Right-click the <Report project>\Reports node in the Solution Explorer.
-
Select Add New Project from the context menu.
Visual Studio will display the Report Wizard, in which you can specify report properties.
2. Specifying Report Properties
Follow the steps below to specify report properties by using the Report Wizard.
2.1 Specifying Connection Parameters
On the first page of the wizard you can specify the connection parameters.
-
In the Type box choose Microsoft SQL Server Analysis Services.
-
Click Edit. This will call the Connection Properties dialog where you can specify the database server and database name.
- In the dialog:
-
Type the server computer name in the Server name edit box and specify the desired database in the Select or enter database name box.
-
Click Test Connection to verify the connection parameters. If verification fails, correct the parameters.
-
Click OK.
-
- Click Next to switch to the next page of the Report wizard.
2.2 Specifying Report Data
The Design the Query page of the wizard lets you specify report data. The Team Foundation work item database is an SQL Server database, from which you can query data using SQL statements. To create the query code, Visual Studio provides Query Builder. To call it, click Query Builder on the wizard page.
The following steps demonstrate how you can use the builder (for complete information on using the query builder, see the Visual Studio documentation):
-
Click the button that is shown over the Metadata section. This will call the Cube Selection dialog.
-
To work with test results, Visual Studio provides the Test Result cube. Select this cube in the dialog and click OK.
-
Visual Studio will update data in the Metadata section.
-
Drag the Test Result > Team Project node from the Metadata section to the upper right area.
-
Select your team project in the Filter Expression field.
-
Drag the Test Result > Build node from the Metadata section to the upper right area.
-
Select your build type in the Filter Expression field.
-
Drag the Measures > Test Results > Result Count node to the lower right area.
-
Drag the Outcome and Result nodes to the lower right area.
-
Click OK to save changes.
Visual Studio will display the query code. Click Next to continue.
2.3 Specifying a Report Layout and Color Scheme
On the next wizard pages you can specify the report layout (table or matrix), grouping criteria and color settings.
The last page of the wizard displays summary information for the created report and lets you specify the report name.
Type the desired report name and click Finish.
Visual Studio will create a new report and display it in the Solution Explorer under the <Report project>\Reports node. Visual Studio will also open the report editor where you can modify the report’s query and layout.
3. Deploying a Report
To deploy the report:
-
Right-click the report project in the Solution Explorer and select Properties from the context menu. This will call the Project Properties dialog.
-
In the dialog:
-
Important: In the TargetReportFolder property enter your team project’s name.
-
In the TargetServerURL property specify the string http://<servername>/ReportServer.
-
Click OK to save the changes.
-
-
Right-click the report project in the Solution Explorer and select Deploy from the context menu. Visual Studio will add the report to your team project and show it in the Team Explorer under the <Team_Project> > Reports node.
See Also
Running AQTime Projects as Part of Build And Release Pipeline