index > Team Foundation Server - Reporting > problems passing parameters to subreport

problems passing parameters to subreport


hi,

i want to pass parameters to a subreport. i followed the description of the following how-to:

http://msdn2.microsoft.com/en-us/library/ms160348.aspx

so i select in the properties - parameter tab of the subreport all the provided parameter name. actually there is just one. and i checked that the subreport really just need one parameter. that is ok.

the parameter is the workitem id of a workitem. and i just wanted to pass the value 3. so i put 3 in the parameter value. i tried also to submit the id value of a work-item displayed in the main - report (=Fields!ID.Value)

but i get always the same error.

[rsErrorExecutingSubreport] An error occurred while executing the subreport ?榮ubreport1?? One or more parameters required to run the report have not been specified.

so the error message is very clear. but i cant pass more parameters to the subreport because the subreport is very easy and just need a work-item id. and i checked the needed parameters in "report - report parameters".

when i don麓t pass any parameter the including of the subreport works fine. but i want to pass the id of a specific work-item to display a corresponding report.




thomaskremmel

I am not an expert at creating sub-reports however in messing around with this on my machine I found:

This may be because the parameter you are supplying is a Query Parameter instead of a Report Parameter. I was able to pass a work item ID by doing the following:

On your sub-report change your Report Parameter to be Non-queried.
From the Data or Layout Tab: Report -> Report Parameters
Change Available Values: "From query" to "Non-queried" - May also want to change from Mulit-Value to Single-Value if you are displaying a single work items properties

After these changes my Report Parameter for my subreport was as follows:
Name: WorkItemSystemId
Data type: String
Hidden checked, all other not checked
Available values: "Non-queried", no values added.
Default values: null

On the report including the sub-report:
On Layout tab: Right click the subreport -> Properties
General tab: Subreport: <Sub report name>
Parameters tab: Parameter Name: WorkItemSystemId
Parameter Value: [Work Item].[System_Id].&[2]
OK
In the Properties window (not the one you had open , then one under View -> Properties Window) change the NoRows property to somthing like "This subreport contains no data" so something is displayed when your query in your subreport doesn't return any data.

Save, Preview ... you should see your data.

Depending on your query in your subreport you may need to edit the Parameter Value.

Nick Ericson - MSFT
reply 2

You can use google to search for other answers

 

More Articles

Log of TFS activities???
Edit reports from Agile process template?
Importance of Work Items - Remaining Work
NullReferenceException during Code Churn Calculation
Reporting Services Hidden Lines
custom views in TFSWarehouse
Can't find links between Work item and test in the TfsWarehouse
error whyle tryng to export to excel
The synchronization issue of the reporting
How to accss Symptom and StepsToReproduce fields in Report Builde...
Welcome to Bokebb   New Update   Joins the collection  
 

New Articles

ReportProcessingException: The Language …
Error executing reports in RTM Trial
Error Executing reports
Reporting Services Hidden Lines
Error in Customising a existing report
how to install report designer?
Problem accessing TFSwarehouse using OLA…
How to Updating report from stored proce…
NullReferenceException during Code Churn…
Reuse query definition in reports ?
Datawarehouse, how can I do?
Is there a way to select the executed te…
Reports not accessible through project p…
urgent: Connection Problems
cubes issue

Hot Articles

Importance of Work Items - Remaining Work
How do I set default value for a dimensi…
TFS reporting
How do I create a new QA Report in Team …
Setting default parameter for project in…
Reporting on all Projects
schedulingfinishdate error + how to add …
how to produce reports using rs with fea…
Error when trying to display a report
How to edit corewin_express.vsprops?
urgent: Connection Problems
TF53010 An unexpected exception occured …
Parameters in Report Server
Error Generating model for Olap Data Sou…
how to install report designer?

Recommend Articles

Failed to load adapter
Adding the Build_Type field to the TFS B…
Error Generating model for Olap Data Sou…
how to install report designer?
Reporting on all Projects
TFS Project & Report Server ERrors
How to Remove the row which doesn't have…
Extra strain report (overeffor or sobree…
Render and Create PDF File directly from…
Restoring reports for a team project
Create Report Problems
Unable to access any of the reports.
How do i modify the filter on a report
Print reports without preview
Merged Changesets Report