After having some issues figuring out how to get multiple reports in a single document, I finally stumbled onto the ReportBook class.
I have implemented a number of different single page report documents and have, up until now, had no trouble adding them to the book and getting them to display. The issue that I've come across is that I have one derivation of the report that requires three separate instances of a single page, so
public class MultiSheetReport_Group1 : Telerik.Reporting.ReportBook
now, I have an Group that requires a monthly breakout of the itemized page, so there is a GroupFourItems report that takes in both the id to read as well as the month value that I would like to print that report for. The issue that I am having is that for each instance of the Monthly Report, the same value is being sent to the ObjectDataSource constructor for the month value.
I've attempted to create another constructor for the MultiSheetReport() like so:
public MultSheetReport(int parentId)
var monthTriplet = DateTimeHelper.GetMonthOrdinals(parentId);
// monthTriplet is a Tuple of int, int, int
var cvrPage = new CoverPages.GroupOneCoverPage();
cvrPage.ReportParameters.Add(new ReportParameter("id", ReportParameterType.Integer, parentId));
var m1ItemPage = new ItemizedPage.GroupOneItems();
m1ItemPage.ReportParameters.Add(new ReportParameter("id", ReportParameterType.Integer, parentId));
m1ItemPage.ReportParameters.Add(new ReportParameter("month", ReportParameterType.Integer, monthTriplet.Item1));
var m2ItemPage = new ItemizedPage.GroupOneItems();
m2ItemPage.ReportParameters.Add(new ReportParameter("id", ReportParameterType.Integer, parentId));
m2ItemPage.ReportParameters.Add(new ReportParameter("month", ReportParameterType.Integer, monthTriplet.Item2));
and so on...
The first problem is that the parameterized constructor for the reportbook is never called as the report, only the default constructor. This leads to the second issue which is that when I put a breakpoint on the constructor for the ObjectDataSource that backs the ItemizedPage.GroupOneItems report class, the exact same value is passed in for each of the months. I'm not entirely sure how to fix this.