SSRS two datasets need to use field from one dataset as a parameter in second?
The issue is that the in field that has the data is just one record in the data set pulled from a set stored proc (not touchable). Then using it as a parameter 开发者_Python百科in the second dataset. Any help would be appreciated.
Add parameter
Select parameter visibility as Hidden
Go to Default Values: (Screenshot of below)
Select "Get values from a query" (and select your first dataset and value field)
In Dataset 2 filter the data with your new parameter
i.e. SELECT * FROM XYZ WHERE ABC IN (@Param)
You can do this using a subreport.
Add a subreport to the main report. Add a parameter to the subreport.
Open the rdl of the subreport, add a paramter with the same name.
create a dataset in that RDL using your query for exampleselect * from YourTable where ENTY_KEY = (@param)
精彩评论