It seems like it should be trivial, but I'm having difficulties.
I have a main report, I fill in the data sets as shown below in ReportViewer.aspx.cs.
ReportViewer.LocalReport.ReportPath = "~/SummaryReport.rdlc"; ReportDataSource requestsSource = new ReportDataSource(); requestsSource.Name = "RequestHeadersDataSet"; requestsSource.Value = GetSummaryRequestsDataSet();
I also have a subreport that my main report refers to in a row group in a table. The dataset has a RequestName column. I pass this through the Subreport properties on the Options tab.
As soon as I add a data set to the data set, I get the error message: Data retrieval failed for the subreport. No wonder, given that I never filled in anything.
But how can I add a subreport to the data source? The report path for ReportViewer is set to my main report.
Both use the same dataset, if that makes any difference.
source share