Hi guys,
I know this has been asked in different ways before but what I'm looking to do is dynamically assign a reports datasource at runtime. Within this report will be a subreport, generated for every record of the datasource.
So my example would be by having a absence report for employees. The parent report will be bound to a list of employee object, in which there will a list of absences of type absences. This list is what I want to bind to a sub report. (see code below)
I've been going through a couple of other similar question on here and trying to figure out the best way.
What I have is a sub report with the bindings
Property Path Expression
DataSource =ReportItem.Absences
I found the documentation a little unclear in what is the datasource is and what is the properties being displayed. So any and all help is greatly appreciated.
public Class Employee{
public string EmployeeName {get; set;}
public string EmployeeNumber {get; set;}
public List<
Absence
> Absences {get; set;}
}
public Class Absence{
public DateTime AbsenceDateFrom{get;set;}
public DateTime AbsenceDateTo{get;set;}
public string AbsenceReason{get;set;}
}