Pass field from one dataset to another dataset as parameter In SSRS 2008 R2

11,895

I had the same problem, where the value was always from the first record in the parent report dataset for each subreport record.

In my case, the resolution was to remove the hidden parameter that I was using in the parent report. The default value I was assigning for that parameter were results from a query.

I then went into the properties of the Subreport, selected Parameters and in the Value dropdown where I originally assigned my parent report parameter, I switched it to the field name of the parent report dataset field so that it would pass the value to my subreport parameter.

Hope this helps.

Share:
11,895
Hitesh Gupta
Author by

Hitesh Gupta

Updated on June 04, 2022

Comments

  • Hitesh Gupta
    Hitesh Gupta almost 2 years

    I have a scenario where one of my data-set returns multiple records. Now I have implemented grouping in my report so as to display each record from this data set on a different page.

    Now I have an another dataset which loads some data using fields from dataset1 as parameter. That means I need to assign the fields from dataset1 to dataset2 as parameter for each record.

    For a single record, we can assign the values from dataset1 to a report parameter and then use it for our dataset.

    But in this case, parameter always holds the value 1st record and passes it for every page or group.

    How can I achieve this?