Thursday, January 26, 2012

Create TFS reports using Excel Reporting

TFS 2010 has lot of Excel reports and a report template to use TFS Analysis services

clip_image002

Customizing existing Excel report

Open up the report from TFS

Here is “Build Status” Excel report

clip_image004

On the Pivot Table Field list, you can drag and drop fields to Report Filter/Series/Categories/Values section to change the reports look and feel

clip_image006

Guidance tab

There is a guidance tab in all the excel reports, it provides the detail about the report

clip_image008

Creating Report from Report Template

Open the Report Template from TFS

clip_image010

Highlight the PivotTable, the PivotTable Field List window appears

On the “Show fields related to” dropdown select the perspective you would like to report on

clip_image012

On the Pivot Table Field list, you can drag and drop fields to Report Filter/Series/Categories/Values section to change the reports look and feel

clip_image014

Adding PivotChart

Click on PivotChart menu, it shows the Chart list, pick the chart you would like to include

clip_image016

clip_image018

Creating Database connections

clip_image020

Enter the reporting server name

clip_image022

You can create connection to the whole Team System cube or individual Perspective

clip_image024

Click next and finish wizard to create the database connection

Changing data Source

Click on the PivotTable, the “PivotTable Tools” menu appears on the menu bar and select “Options”

On the “Change Data Source” menu select Change Data Source menu

clip_image026

Choose connection from the existing connections.

clip_image028

Creating TFS Reports using Report Builder

 Step 1: Go to Reports Site and click on “Report Builder”

clip_image002

clip_image004

Report Builder screen

clip_image006

Step 2: Double click on the Perspective you want to report on. It opens up Design report view

clip_image008

Step 3: Fill in the report title, drag and drop the fields

clip_image010

Step 4: Adding totals

clip_image012

Step 5: Adding filters. Click on Filter menu. On the Filter Data screen, drag and drop the filters

clip_image014

Step 6:  Executing the reports

clip_image016

clip_image018

Tuesday, January 24, 2012

Team Query: Filter Fields by Team Project/Process Template on TFS Web Access 2010

By default TFS Web Access 2010 shows all the fields from TFS while creating the Team query. If you have team projects created using various Process templates, you might end up creating a query using a field from incorrect process template/team project.

You can restrict the Filter fields on TFS Web Access 2010 by selecting a Team Project (Which is nearly same as process template)

image

Friday, January 20, 2012

Excel Reporting - Provide access to TFS Analysis Services

For excel reporting using TFS 2010 cubes (Analysis Services), the users requires read access on Analysis Services.

Here are the steps to provide access to Analysis Services.

Step 1: Connect Analysis Services using the admin account

image

Step 2: Go to Roles and open up the TFSWarehouseDataReader group. If you do not see one you can create one.

image 

Step 3: Here is TFSWarehouseDataReader role persmission

image

Step 4: Open up the Membership node and add the user/NT group for access

image

Thursday, January 19, 2012

Undo Pending Changes - Search/Query all pending changes in TFS/VS

As a CM, we get request to undo other user changes all the time, I always use these steps to search and get the pending changes

Step 1: On Visual Studio on the Source Control explorer, right click on the folder where you feel there are some pending changes and that needs to be undo. Click on the Status menu.

image

Step 2: It show the Find/browse window. You can click on find button to get all the pending changes from TFS.

image

Step 3: Once you get the pending changes, you can undo the changes.

TFS Client Cache cleanup

In many situation you might need to clean up TFS client cache so that Visual Studio shows the correct details from correct TFS server/instance. I had incidents that even though the Visual Studio says it is connected to our QA TFS server, but actual operations would go to our TFS Prod server. In this scenario I would go and clean the TFS client cache.

The TFS client cache location changes by the Windows Operation system

Windows XP

C:\Documents and Settings\<User ID>\Local Settings\Application Data\Microsoft\Team Foundation\3.0\Cache

Windows 7

C:\Users\<User ID>\Local Settings\Application Data\Microsoft\Team Foundation\3.0\Cache

Delete ONLY the folders from the TFS cache location, leave other setting files.

image

Thursday, January 5, 2012

TFS Build 2010 calls Ant for Java

Java builds using Ant/Team Build 2010 can be configured easily with help of Team foundation Server build extensions power tools.

Prerequisites

We can setup Java builds using Ant scripts.

Here are the software/tools required on the Build server (Assuming TFS build has been already setup on this server).

1. Install Java JDK

2. Install ANT 1.8.x

3. Define ANT_HOME and JAVA_HOME

4. Install Team Foundation Server Build extensions power tool August 2011 (http://visualstudiogallery.msdn.microsoft.com/2d7c8577-54b8-47ce-82a5-8649f579dcb6/)

At the client machine (Optional to verify the ant script at client machine)

1. Install Java JDK

2. Install Apache ANT 1.8.x

3. Define ANT_HOME and JAVA_HOME

4. Install Eclipse helios or higher

5. Install Team Explorer Everywhere eclipse plug-in

6. Ant script to compile the code (We can create, if this is not available)

Steps

Step 1: In Eclipse on “Team Explorer”, right click on the Builds node (on the TFS Project) and select “New build Definition”

clip_image002

Step 2: Create build

clip_image004

Step 3: Setup the build triggers. If you need CI build, choose the “Continuous Integration – Build each check-in”

clip_image006

Step 4: Choosing the workspace mapping.

Select the TFS source folder where you have source and the compile ant script

clip_image008

Step 5: Build defaults. Specify the build controller and drop location

clip_image010

Step 6: Creating team build proj file. Click on “Create” button

clip_image012

Select “MSBuild Configuration from Existing Ant Buildfile” and click next

clip_image014

Browse and select the ant build file and click finish

clip_image016

Build has been created

clip_image018

Step 7: Queue the build

clip_image020

Step 8: Build Succeeded.

clip_image022