Share via


Add Reports to the Process Template

By using the Reporting plug-in, you can specify the folder structure and set of reports that will appear under the ReportReports node for a new team project.

Important

The Reporting plug-in requires that the team project collection where you will create a team project has been configured with SQL Server Analysis Services and SQL Server Reporting Services. For more information, see Add a Report Server to a Team Project Collection.

You specify two main tasks by using the Reporting plug-in. First, you create the reporting site by using the site element. Second, you specify the folder structure and the reports to be uploaded to the site by using the folder and report elements. The reports that you upload have an .rdl extension and are designed for use with Reporting Services. For an overview of the reports that the process templates for Microsoft Solutions Framework (MSF) provide, see Reports (Agile) or Reports (CMMI).

After a team project is created from the process template, you can add, remove, rename, and change the folder structure for reports. For more information, see Manage Reports.

Reporting Plug-in Name and Location

The following table summarizes the names of the file, the folder, and the plug-in for the MSF process templates.

File name:

ReportsTasks.xml

Folder name:

Reports

Plug-in name:

Microsoft.ProjectCreationWizard.Reporting

Note

You can change the names of the XML file and the folder but not the plug-in. Visual Studio Team Foundation Server does not include a mechanism for the deployment of client-side plug-ins, policies, or other modifications. If you want to deploy this kind of functionality, you must use your own distribution and installation program.

In the XML file, you specify one or more tasks and their dependencies. For an example of a task that specifies a set of reports, see the ReportsTasks.xml file in the MSF for Agile Software Development process template.

Reporting Plug-in Syntax Structure

The Reporting plug-in file must conform to the schema definition for ReportingServices, which is defined in the Rosetta.xsd file, and be specified in its own file. You can download the schema files for process templates from the following page on the Microsoft website: Process Template and Work Item Schemas for Visual Studio Team Foundation.

The following syntax shows the structure of the Reporting plug-in. For a description of each element, see ReportingServices Child Elements later in this topic.

<?xml version="1.0" encoding="utf-8"?>
<tasks>
  <task id="Site" plugin="Microsoft.ProjectCreationWizard.Reporting" completionMessage="Project Reporting site created.">
    <dependencies />
    <taskXml>
      <ReportingServices>
        <site> </site>
      </ReportingServices>
    </taskXml>
  </task>
  <task id="Populate Reports" plugin="Microsoft.ProjectCreationWizard.Reporting" completionMessage="Project reports uploaded.">
    <dependencies>
      <dependency taskId="Site" />
    </dependencies>
    <taskXml>
      <ReportingServices>
        <folders> . . . </folders>
        <reports> . . . </reports>
      </ReportingServices>
    </taskXml>
  </task>
</tasks>

Creating the Reports Site

For the reports to run correctly, you must create a reporting site. The reporting site will have a link to it on the project portal home page, and the link will be labeled ReportReports. To create the reporting site, use the site element, as the following example shows:

<taskXml>
   <ReportingServices>
        <site></site>
   </ReportingServices>
</taskXml>

Defining Folders

You can create folders on the reporting site by using the folder element. Use the path attribute to specify the relative path name of the new folder. The folder appears on the project site and under the Reports folder in Team Explorer.

The following example creates four top-level folders and two sub-folders on the reporting site. The top-level folders are labeled Bugs, Builds, Project Management, and Tests. The two sub-folders are located under Project Management and are labeled Visual Studio and Visual Studio ALM.

<taskXml>
   <ReportingServices>
      <folders>
         <folder path="Bugs" />
          <folder path="Builds" />
          <folder path="Project Management" />
          <folder path="Project Management/Visual Studio" />
          <folder path="Project Management/Visual Studio ALM" />
          <folder path="Tests" />
      </folders>
   </ReportingServices>
</taskXml>

Specifying the Reports to Upload

Reports are defined by .rdl files. To add reports to the reporting site, copy the report .rdl files into a folder under the Reports folder in the process template. Then use the report element to describe the necessary properties and data sources for the report.

The following example specifies that the Remaining Work.rdl file will be uploaded to the Project Management folder. You must specify the ExplicitProject parameter and the data sources for each report. The data sources in the following example correspond to the names that are automatically assigned to the Analysis Services cube and data warehouse relational database for Team Foundation Server 2010.

Note

The names of the reporting services data sources are Tfs2010ReportsDS and Tfs2010OlapReportsDS. Even though you may have installed or upgraded to TFS 2012, these names, which were assigned to the data sources for a TFS 2010 installation, continue to be used.

<taskXml>
   <ReportingServices>
     <reports>
        <report name="Remaining Work" filename="Reports\Remaining Work.rdl" folder="Project Management" cacheExpiration="30">
       <parameters>
          <parameter name="ExplicitProject" value="" />
       </parameters>
       <datasources>
          <reference name="/Tfs2010OlapReportDS" dsname="TfsOlapReportDS" />
          <reference name="/Tfs2010ReportDS" dsname="TfsReportDS" />
       </datasources>
    </report>
 . . . 
     </reports>
   </ReportingServices>
</taskXml>

ReportingServices Element Reference

The following syntax shows the structure of the ReportingServices element and its child elements. You specify these elements within the taskXml container element and only for the Reporting plug-in.

<ReportingServices>
   <folders>
      <folder />
 . . . 
   </folders>
   <reports>
      <report>
         <parameters>
            <parameter />
         </parameters>
         <datasources>
            <reference />
         </datasources>
      </report>
 . . . 
   </reports>
</ReportingServices>

The following table describes the elements that you use to specify a report to upload to a team project and that can be accessed through SQL Server Reporting Services.

Element

Syntax

Description

datasources

<datasources>
   <reference />
</datasources>

Required child element of report.

Contains a collection of reference elements that each specify a data source that the report uses.

folder

<folder path="FolderName" />

Required child element of folders.

Defines the name of a folder to create under the Reports node for a team project.

folders

<folders>
   <folder path="FolderName" />
</folders>

Optional child element of ReportingServices.

Contains a collection of folder elements that each specify the name of a folder to create.

parameter

<parameter name="ParameterName" value="ParameterValue" />

Where each attribute has the following definition:

  • name: The name of a parameter that you want to specify.

  • value: The value to assign to the parameter.

At a minimum, you must define the following parameter to make your report automatically use the project that contains your report:

<parameter name="ExplicitProject" value="" />

Required child element of parameters.

Specifies the name of a report parameter and the value to assign to it.

parameters

<parameters>
   <parameter />
</parameters>

Required child element of report.

Defines a collection of parameter elements for a report.

properties

< properties >
   < property />
</ properties >

Optional child element of report.

property

<property name="PropertyName" value="PropertyValue" />

Where each attribute has the following definition:

Required child element of properties.

reference

<reference name="RelationalDBName" dsname="OLAPDBName" />

Where each attribute has the following definition:

  • name: The name of the data source in Team Foundation Server. For Team Foundation Server 2010, this value is either Tfs2010OlapReportDS for the Analysis Services cube or Tfs2010ReportsDS for the relational data warehouse.

  • dsname: The name of the database resource. Specify TfsOlapReportDS for the Analysis Services cube, and TfsReportsDS for the relational data warehouse.

For more information about the names of reporting data sources, see Locating Reports After the Upgrade to Team Foundation Server 2010.

Required child element of datasources.

Specifies the names that are assigned in Team Foundation Server for the data warehouse relational database and the Analysis Services cube.

report

<report name="ReportName" filename="ReportFilePathName" 
folder="FolderName" cacheExpiration="CacheDuration">   <folders>
   <parameters>. . .</parameters>
   <datasources>. . .</datasources>
   <properties>. . .</properties >
</report>

Where each attribute has the following definition:

  • name: The name of the report to display on the reporting site and in Team Explorer.

  • filename: A relative path under the local Reports folder from where to get the .rdl report file.

  • folder: A relative path name of the location to add the report on the reporting site.

  • cacheExpiration: The default number of minutes for which the report is cached.

Required child element of reports.

Specifies the name of the report, the file that contains the .rdl definition, and folder to which the report is uploaded. Team Foundation Server

reports

<reports>
   <report />
   . . .
</reports>

Required child element of ReportingServices.

Contains a collection of report elements that each specify the name of a report file to upload.

ReportingServices

<ReportingServices>
   <folders>. . .</folders>
   <reports>. . .</reports>
</ReportingServices>

Required child element of the taskXml element for the Reporting plug-in.

Describes the tasks that are required to define the reports and folders for SQL Server Reporting Services.

site

<site> </site>

Required element for the Reporting plug-in.

Specifies that a reporting site for the team project will be created.

See Also

Concepts

Customize Process Templates

Step-by-Step Customization Process

Working with Process Template Files

Customize Functional Areas within a Process Template