tags:

views:

13

answers:

1

I am customizing one of the CMMI reports in TFS 2010. One of them is "Bug Status". When I open the query in the Query Designer of BIDS, i see that two backslashes (//) are used for comments.

But where does the comment stop? It looks like a tab is the stop....

Is there any reference to find about the comment syntax ?

Here is the query:

SELECT
{
    [Measures].[Work Item Count]
} ON COLUMNS,
{
     //Filter out people who don't currently have any work items assigned to them
 (
        CrossJoin
        (
            //
            // This block of code gets the top 10 users, based on how many active bugs they have.
            //
            TopCount(
                NonEmpty(
                    [Work Item].[System_AssignedTo].Children,
                    [Measures].[Work Item Count]
                ),
                @TopUserCount,
                [Measures].[Work Item Count]
            ),
            [Work Item].[Microsoft_VSTS_Common_Priority].[All].Children,
            [Work Item].[Microsoft_VSTS_Common_Severity].[All].Children
        ),
        [Measures].[Work Item Count]
    )
} ON ROWS
FROM
(
    SELECT
        CrossJoin(
            StrToMember("[Team Project].[Project Node GUID].&[{" + @ProjectGuid + "}]"),
            StrToMember("[Work Item].[System_WorkItemType].[" + @BugName + "]"),                   
            StrToMember("[Work Item].[System_State].&[" + @ActiveName + "]"),
            StrToSet(@AreaParam),
            StrToSet(@IterationParam),
            StrToSet(@PriorityParam),
            StrToSet(@SeverityParam)
        ) ON COLUMNS
    FROM [Team System]
)
+2  A: 

http://msdn.microsoft.com/en-us/library/ms145585.aspx

// (double forward slashes)

These comment characters can be used on the same line as code to be run or on a line by themselves. Everything from the double forward slashes to the end of the line is part of the comment. For a multiple-line comment, the double forward slashes must appear at the starting of each comment line. For more information, see // (Comment) (MDX).

Andrey
Andrey, many thanks!
Patrick Peters