or
// i'm using needdatasource event to fetch data with report parmsvoid RptSaleDailyView_NeedDataSource(object sender, EventArgs e) { Telerik.Reporting.Processing.Report report = (Telerik.Reporting.Processing.Report)sender; . . // fetch data into business objects. var list = MyBizObject.GetReportData(); // i'm sure my bisiness object has records for various child objects. this.objectDataSource1.DataSource = list; report.DataSource = this.objectDataSource1; //// sub report binding this.subMainPart.Bindings.Add(new Telerik.Reporting.Binding("ReportSource", "= GetSaleMainPartReportSource(ReportItem.DataObject.DayReportList)")); } public static ReportSource GetSaleMainPartReportSource(object source) { var report = new RptDailyMainPartView(); report.DataSource = source; return new InstanceReportSource { ReportDocument = report }; } public RptDailyMainPartView()
{
//
// Required for telerik Reporting designer support
//
InitializeComponent();
this.Bindings.Add(new Telerik.Reporting.Binding("DataSource", "=ReportItem.Parent.DataObject.DayReportList"));