Reports Process Template Plug-in
The Reports plug-in defines a team project's initial reports. The plug-in name is Microsoft.ProjectCreationWizard.Reporting. The Reports XML file is named ReportsTasks.xml and is located in the Reports folder in the process template folder hierarchy. You can change the XML file and folder name if necessary.
In the XML file, specify one or more tasks and their dependencies. For an example of tasks specifying simple reports, see the ReportsTasks.xml file in the MSF for Agile Software Development process template.
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 plug-ins, policies, or other modifications to Team Explorer, you must use your own distribution and installation program.
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 labeled Reports. To create the reporting site, use the site element shown in the following example.
<task id="Site" plugin="Microsoft.ProjectCreationWizard.Reporting" completionMessage="Project Reporting site created."> <dependencies/> <taskXml> <ReportingServices> <site /> </ReportingServices> </taskXml> </task>
You can create folders on the reporting site 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 a Public folder on the reporting site.
<task id="Populate Reports" plugin="Microsoft.ProjectCreationWizard.Reporting" completionMessage="Project site created."> <dependencies> <dependency taskId="Site"/> </dependencies> <taskXml> <ReportingServices> <folders> <folder path="Public"/> </folders> </ReportingServices> </taskXml> </task>
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.
<report name="" filename="" folder="" cacheExpiration ="30">
The following table describes the attributes for the report element.
The name of the report to display on the reporting site and in Team Explorer.
A relative path under the local Reports folder from where to get the .rdl report file.
A relative path name of where to add the report on the reporting site.
Sets the default number of minutes the report is cached.
You can specify values for parameters in a report. This is often used to map the Project parameter to the current team project. Most reports will not run correctly without a reference to the current team project. To map the Project parameter to the current team project, specify the value as $$PROJECTNAME$$.
<parameters> <parameter name="" value=""/> </parameters>
The following table describes the attributes for the property element.
The name of the parameter in the report to bind.
The value to which to bind the parameter.
You must map each data source name in each report to a live Team Foundation Server data source. Use the reference element to specify a data source.
<datasources> <reference name="" dsname=""/> </datasources>
The following table describes the attributes for the reference element.
The name of the data source in the report.
The name of the Team Foundation Server data source. Typically this value is either TfsReportDS or TfsOlapReportDS.
The following example shows how to add a Work Items report. The Project parameter will be bound to the current team project, and the report will be bound to the TfsReportDS data source.
<report name="Work Items" filename="Reports\Work Items.rdl" folder="" cacheExpiration ="30"> <parameters> <parameter name="Project" value="$$PROJECTNAME$$"/> </parameters> <datasources> <reference name="/TfsOlapReportDS" dsname="TfsOlapReportDS"/> <reference name="/TfsReportDS" dsname="TfsReportDS"/> </datasources> </report>