Manikandan Thangaraj
Manikandan Thangaraj

Reputation: 1594

SSRS 2008 R2 subreport parameter from main report data

I want to show Vendor wise Material receipt in main report (Lot of columns exists) and multiple payments made against each receipts in the subreport. In the main reprot I have dtReceipt and a subreport dtPayment with a separate set of parameters like date etc . Both the report are running independelntly.

Mainreport details contains a field (in data set) called ReceiptNo which I want to pass to sub report as filter parameter of the data set in subreport. When I run it from Main report system is saying that Error Subreport cannot be shown due to one of the parameter is not passed properly.

Upvotes: 0

Views: 4140

Answers (2)

Gowtham KS
Gowtham KS

Reputation: 11

You Wanted to Pass a value from the main report dataset to the subreport. In this case have the subreport inside a table that associates with the main report dataset, and then use the dataset field in the subreport parameter value .

Note : Make sure your main dataset returns single row . If it returns multiple row then subreport will b replicated for every field value . It's a kind of dynamic sub report creation.

Upvotes: 1

Jamie F
Jamie F

Reputation: 23789

Make sure that you are passing in all parameters for the subreport. It does not inherit parameters from the parent report: they must all be specified.

Also, when passing the parameters, make sure you are setting a correct parameter value in the subreport, not the parameter label. (Sometimes one will be the ID and the other will be the name, for example.) The user chooses the label in the UI, but the subreport must be called with the value.

Upvotes: 0

Related Questions