When trying to compile such report I got the following error:
The expression used for the parameter ‘@param1’ in the dataset ‘@param1’ refers to a field. Fields cannot be used in query parameter expressions.
It came out that such construction is not allowed. I'm guessing it's because you cannot define the order in which the dataset are evaluated.
To achieve such dependency you need to use a sub-report:
- Create a new report that will be used as subreport
- Move the dataset "DataSet2" to your new report
- Move all the report content that depends on "DataSet2" to your new report
- Add your new report to the original one as subreport (see how)
- Define new subreport parameter that will be using value of the "Field1" from "DataSet1"
- Adjust the "DataSet2" in your subreport to use the new subreport param