How to pass a parameter to a RDLC subreport
This is one of these posts to remember. Every now and then I am forced to design a bit more complex report that has to pass parameters to its subreports. There are few steps to follow and I don’t want to discover this again in few months, so here’s how it goes.
Edit subreport first. In Report data window right click on Parameters node, click Add Parameter option and fill in the configuration options as on the image below.
On the main report, right click subreport and select Subreport Properties. Go to Parameters tab, click Add and set the same name of the parameter as in the previous step. In the value column, set what’s appropriate. Most likely it will be a column from your data set or some expression.
If in both report and subreport name and type will match, data should be passed into the subreport without any issues.