Initial set up of the Team Project defines default reports. The plug-in responsible for the reports within TFS is call Microsoft.ProjectCreationWizard.Reporting. Report XML file is located in the Reports folder of the Team Project and is called ReportsTasks.xml.
In order to run reports we need to define reporting website which will have a link to it on the project portal Home Page under Reports label. This link can be set with XML element called task:
<task id="Site" plugin="Microsoft.ProjectCreationWizard.Reporting" completionMessage="Project Reporting site created.">
We also can create our own folder on the reporting website using folder element. We need to set relative path name of the new folder.
All of our reports have .rdl file extensions. In order to add these reports we need to copy .rdl files into folder under the Reports folder in the process template and then with the help of the report element describe properties of this report.
<report name="" filename="" folder="" cacheExpiration ="30">
In addition, we can specify values for a report parameters.
<parameters> <parameter name="" value=""/> </parameters>
We are required to map data source name in each report to TFS data source
<datasources> <reference name="The name of the data source in the report." dsname="The name of the Team Foundation Server data source. Typically this value is either TfsReportDS or TfsOlapReportDS."/> </datasources>
Here is a complete example of such a mapping
<report name="Work Items" filename="Reports\Work Items.rdl" folder="" cacheExpiration ="30">
<parameter name="Project" value="$$PROJECTNAME$$"/> </parameters>
<reference name="/TfsOlapReportDS" dsname="TfsOlapReportDS"/>
<reference name="/TfsReportDS" dsname="TfsReportDS"/> </datasources>