Hello
I have a masterreport containing a subreport i need to bind to a quoteobject.
My masterreports datasource are set via an overloaded contructor like:
public masterreport(string P1, string P2)
{
InitializeComponent();
//set masterreport datasource (Works fine)
Quote q = new Quote(P1, P2);
this.DataSource = q;
//load subreportcontrol (doesent work!)
this.subReport1.ReportSource = new BackEnd.Reports.mysubreport(q);
}
my subreports overloaded constructor looks like :
public subreport(Quote q)
{
this.DataSource = q.cfgs; //cfgs is List<quotelines>
}
The masterreport is loaded into a reportviewer using :
this.ReportViewer1.ReportSource = new BackEnd.Reports.masterreport("param1","param2");
Result is ok regarding the masterreport, where as the subreport doesent load.
The subreport works fine if I bind a datasource in the designer.
Should the above not work for binding the subreport, or have i missed something?
any inputs are welcome
Regards
MArk