I'm trying to create a compilation of several instances of the same report using a ReportBook.
The issue I'm having is that although I'm instantiating separate instances of the report and setting the date parameter for each, all the reports are returning data for the same date, rather than for their individual parameter dates.
My code:
ReportBook reportBook = new ReportBook();reportBook.Reports.Add(new TestReport());reportBook.Reports.Add(new TestReport());reportBook.Reports[0].ReportParameters["date"].Value = new DateTime(2015, 10, 1);reportBook.Reports[1].ReportParameters["date"].Value = new DateTime(2015, 10, 2);var instanceReportSource = new InstanceReportSource();instanceReportSource.ReportDocument = reportBook;reportViewer.ReportSource = instanceReportSource;reportViewer.RefreshReport();I'm working in C#; the report is included in the Visual Studio project as an object (not a seperate .trdx), with an ObjectDataSource using an externally referenced Entity Framework repository; the DataMember is a method of the EF repository that is essentially 'GetThingsForDate(DateTime date)'.
Any insight much appreciated!