none
Filter Team Project in report RRS feed

  • Question

  •  

    Hi every body!

    I have a problem in report in Team Foundation Server.I created a report about bug for Team Foundation Server by Chart in Sql Server Business Intelligence Development 2005.I query database TfsWorkItemsTracking to create dataset for Chart.The query as following:

     

    declare @sql nvarchar(1000)
    declare @bugdisplay varchar(10)
    declare @reson1 varchar(10)
    declare @reson2 varchar(10)
    declare @reson3 varchar(10)

    declare @bugdisplaycs CURSOR
     set @bugdisplaycs=cursor for select [ColName] from [TfsWorkItemTracking].[dbo].[Fields] where [ReferenceName]='BI.Common.BugDisplay'
    open @bugdisplaycs fetch next from @bugdisplaycs into @bugdisplay
    while @@FETCH_STATUS = 0
        BEGIN               
                    FETCH NEXT
     FROM @bugdisplaycs INTO @bugdisplay
        END
                CLOSE @bugdisplaycs
                DEALLOCATE @bugdisplaycs

    declare @reson1cs CURSOR
     set @reson1cs=cursor for select [ColName] from [TfsWorkItemTracking].[dbo].[Fields] where [ReferenceName]='BI.Common.BugReason1'
    open @reson1cs fetch next from @reson1cs into @reson1
    while @@FETCH_STATUS = 0
        BEGIN               
                    FETCH NEXT
     FROM @reson1cs INTO @reson1
        END
                CLOSE @reson1cs
                DEALLOCATE @reson1cs

    declare @reson2cs CURSOR
     set @reson2cs=cursor for select [ColName] from [TfsWorkItemTracking].[dbo].[Fields] where [ReferenceName]='BI.Common.BugReason2'
    open @reson2cs fetch next from @reson2cs into @reson2
    while @@FETCH_STATUS = 0
        BEGIN               
                    FETCH NEXT
     FROM @reson2cs INTO @reson2
        END
                CLOSE @reson2cs
                DEALLOCATE @reson2cs

    declare @reson3cs CURSOR
     set @reson3cs=cursor for select [ColName] from [TfsWorkItemTracking].[dbo].[Fields] where [ReferenceName]='BI.Common.BugReason3'
    open @reson3cs fetch next from @reson3cs into @reson3
    while @@FETCH_STATUS = 0
        BEGIN               
                    FETCH NEXT
     FROM @reson3cs INTO @reson3
        END
                CLOSE @reson3cs
                DEALLOCATE @reson3cs

    .......................................................

     

    I read some report of Team Foundation Server and I see to filter to Team Project, we must create parametter TeamProject and use OLAP.And when I click in report,it will auto add parametter TeamProject and give me result.

    But now I want filter my data to Team Project(use SQL to query data in TfsWorkItemsTracking database) and when I choose my report from one of team project,my report will auto filter data to team project that I choose.

    What must I do?

    Please help me!

    Thank you very much.

    Wednesday, April 9, 2008 10:21 AM