Hi,
I am trying to make a report that has a sub reports.
I have a business object Task as an IList<Task> with a collection TaskDates.
Now, I want all the TaskDates to show as a sub report of Task but I don't understand how to generate the dates.
I have tried this (don't know if it is the "best practice" way):
This is the sub report TaskDates event but it generates:
Unable to cast object of type 'System.Data.DataRowView' to type 'PPS.DO.Task'.
Am I on the right track here or is it completely wrong! :)
OT:
When you are making sample projects of your products it would be super if you could make some of them with business objects and not only "object datasource" like examples made in design page.
I am trying to make a report that has a sub reports.
I have a business object Task as an IList<Task> with a collection TaskDates.
Now, I want all the TaskDates to show as a sub report of Task but I don't understand how to generate the dates.
I have tried this (don't know if it is the "best practice" way):
private void subReport1_NeedDataSource(object sender, System.EventArgs e) |
{ |
Telerik.Reporting.Processing.SubReport subReport = (Telerik.Reporting.Processing.SubReport)sender; |
Task task = (Task)(subReport.DataItem); |
subReport.InnerReport.DataSource = task.TaskDates; |
} |
Unable to cast object of type 'System.Data.DataRowView' to type 'PPS.DO.Task'.
Am I on the right track here or is it completely wrong! :)
OT:
When you are making sample projects of your products it would be super if you could make some of them with business objects and not only "object datasource" like examples made in design page.