I am binding my main report to an instance of an object that looks like this:
public class foo {
public Bar Header { get;set; }
public List<Baz> ListOfStuff { get;set;}
}
I have a sub-report that will display .ListOfStuff, but I'm at a loss on how to bind the sub-report so it has access this data from the main report.
At a high-level, this is how my main report is binding to the original source:
My sub-report doesn't have a DataSource set, so I've tried using NeedDataSource, but I'm not sure what exactly I need to do to bind to the parent data.
I'm sure I'm missing something really simple, but at this point, I'm stuck.
public class foo {
public Bar Header { get;set; }
public List<Baz> ListOfStuff { get;set;}
}
I have a sub-report that will display .ListOfStuff, but I'm at a loss on how to bind the sub-report so it has access this data from the main report.
At a high-level, this is how my main report is binding to the original source:
var report = new TestReport(); var ods = new Telerik.Reporting.ObjectDataSource(); ods.DataSource = instanceOfFoo; report.DataSource = ods; instanceReportSource.ReportDocument = report; ReportViewer.ReportSource = instanceReportSource;
My sub-report doesn't have a DataSource set, so I've tried using NeedDataSource, but I'm not sure what exactly I need to do to bind to the parent data.
I'm sure I'm missing something really simple, but at this point, I'm stuck.