index > Team Foundation Server - Reporting > How can I create Dynamic Query between two dimension parameters.

How can I create Dynamic Query between two dimension parameters.


I have created a report which has two parameters: Build and Run. I want to create Dynamic Query between them. ex. If I select a value of @Build, then the @Run should be generated by @Build. That is to say the @Run should just display the values which have run on the selected Build.

Any help highly appreciated.

Thanks,

juryq

You can set the Report Parameters Default value to come from a query. For an example see the Builds report. When you select a Flavor, for example, the list of values in the Build parameter change accordingly.

The default value for a parameter can be set (in a Report Server Project) by selecting Report -> Report Parameters (having the Data or Layout view active -- not the Preview view).

To see the example in the Builds report:

Download the report:
Browse to http://<ReportServer>/Reports
Select the folder with your project name
Select the Builds report
Select the Properties Tab -> General
Under "Report Definition" select "Edit" and save it somewhere

Create a new Report Server Project and import the Builds Report & Data Sources
Add TfsReportDS and TfsOlapReportDS (these will not be deployed because they already exist) with same properties as existing sources

Import the Builds Report

From the Data Tab select Report -> Report Parameters -> BuildParam
Default Values set to "From query" & Dataset = DefaultBuilds & Value field = ParameterValue

You can view the DefaultBuilds query by selecting it in the Dataset dropdown directly under the Data tab

To execute the queries you will have to make additional changes to the report described here: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=598358&SiteID=1

Let me know how it goes.

Nick Ericson - MSFT

Thank you so much for your help. But I still have not created the Dynamic Query parameters .

I think maybe the Build parameter of the Builds report is filtered by the following MDX in dataset DefaultBuilds:

NONEMPTYCROSSJOIN
(
[Build].[Build].[Build],
[Measures].[Build Project Count],
1
)

and

WHERE
(
STRTOSET("[Team Project].[Team Project].[" + @Project + "]"),
STRTOSET(@PlatformParam),
STRTOSET(@FlavorParam)
)

But how can I make the @Run filtered by the MDX? I don't know which Measure or Dimension should be the second parameter of the NONEMPTYCROSSJOIN function. I created a dataset, it's MDX are as below:

NONEMPTYCROSSJOIN
(
[Run].[Run].[Run],
[Measures].[Build Project Count],
1
)

...

WHERE
(
STRTOSET("[Team Project].[Team Project].[" + @Project + "]"),
STRTOSET(@PlatformParam),
STRTOSET(@FlavorParam)
)

But it does not work. It only can query out all the Run values. :-(

juryq

I used the other dimension Agent.Machine as the parameter and resolved this problem.

Thanks again.

juryq
reply 4

You can use google to search for other answers

 

More Articles

Error when trying to display a report
How to Remove the row which doesn't have data?
What ?淒efault Value??is the correct one to represent ?淪cenarios??
How do I create a new QA Report in Team System
Description of WorkItems
How "State Change Count" Measure Work?
Report parameters problems
TFS Report Error
Creating a custom report -- help
Only one CUBE in Team Foundation Server
Welcome to Bokebb   New Update   Joins the collection  
 

New Articles

Problem with data stored on Warehouse in…
AssignedTo names in reports
Passing new parameters to Report(.rdlc)
Hoe to create an hyperlink column
Print reports without preview
urgent: Connection Problems
Using Excel pivot charts, can I filter o…
Setting default parameter for project in…
Adding custom parameters in Work Item re…
cubes issue
cube versus warehouse
error whyle tryng to export to excel
Reuse query definition in reports ?
After upgrading to latest VSTS reports a…
Reporting on Plain Text Fields in Work I…

Hot Articles

How do i edit or delete reports?
Extra strain report (overeffor or sobree…
Report not showing in Team Explorer
Team System Warehouse Problems
Passing new parameters to Microsoft VB.N…
How can I report developer hours by week?
cube versus warehouse
Deploying cube so as to make reports bas…
Not all work items are displayed.
How to recreate the TFSWarehouse Databas…
After upgrading to latest VSTS reports a…
How do I fix the TfsOlapReportDS user pr…
Description of WorkItems
Reporting Services Error
Error in Reporting

Recommend Articles

Failed to generate reports
Setting default parameter for project in…
ReportServer asking for username and pas…
How to Remove the row which doesn't have…
When trying to add a new VS2005 RDL file…
Warehouse Troubleshooting Guide
Passing new parameters to Microsoft VB.N…
Creating an OLTP datasource for writing …
What is the formal definition of Priorit…
Missing TfsReportDS and TfsOlapReportDS
Reporting Services Hidden Lines
Report Path!
Log of TFS activities???
Error in Reporting
Unable to generate a model from the OLAP…