Hi.
I'm trying to display a master-detail report with a populated object graph.
This is the definition of the class report DataSource:
public class Actuacion
{
// A lot of simple properties here...
public IList<Details> Details {get;set;}
...
}
I created two reports.
- the master report with the data to display of the Actuacion class.
- the subreport with the data to display of the Details class.
How can I set the Datasource of the report and the subreport with a concrete instance of this class?
I'm trying to make something like this:
Report2
myreport = new Report2(); //Master
myreport .DataSource = reportModel; //Instance of Actuacion class
SubReport subreport = (SubReport)myreport .Items.Find("subReport1", true)[0]; //Detail
subreport.ReportSource.DataSource = reportModel.Details;
VisorReports visor = new VisorReports(myreport);
visor.ShowDialog();
but the ReportViewer shows no data.
Thanks in advance!!!
Cesar