=Fields.FirstName + "<br>" + Fields.LastName |
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
<
table
>
<
tr
>
<
td
width
=
"300"
>14" - 350mm</
td
>
</
tr
>
<
tr
>
<
td
><
span
style
=
"font-size: 10px;"
>(725-0001-024)</
span
></
td
>
</
tr
>
</
table
>
<
div
style
=
"display:table; width:300px; position:relative;"
>
<
div
style
=
"float:left; width:200px; position:relative;"
>
14" - 350mm
</
div
>
<
div
style
=
"float:left; width:90px; position:relative;"
>
<
span
style
=
"font-size: 10px;"
>(725-0001-024)</
span
>
</
div
>
</
div
>
<
td
dir
=
"ltr"
lang
=
"nl-NL"
class
=
"s7"
colspan
=
"1"
rowspan
=
"2"
><
div
class
=
"s8"
><
div
class
=
"s8"
>14" - 350mm </
div
><
div
class
=
"s8"
><
span
class
=
"s9"
>(725-0001-024)</
span
> </
div
></
div
></
td
><
td
colspan
=
"2"
rowspan
=
"1"
>