Hi
I have a main report which uses an xml file (to DataTable) as a datasource containing Member ID's.
I also have a subreport for the Member's Addresses.
As each Member is processed in the main report I want to pass the MemberID to the subreport, where I then pass the MemberID into as a parameter in DataAdapter.Fill() method.
I have already implemented the passing of parameters into the DataAdapter and also implemented properties in the subreport to store the parameters being passed from the main report. As so:
My question is....when do I set the properties?
I tried setting them in the main report sections item databinding event but this occurs after the subreport's DataAdapter.Fill() method is called so parameters being passed are 0 and no data is being returned in the subreport.
Many thanks.
I have a main report which uses an xml file (to DataTable) as a datasource containing Member ID's.
I also have a subreport for the Member's Addresses.
As each Member is processed in the main report I want to pass the MemberID to the subreport, where I then pass the MemberID into as a parameter in DataAdapter.Fill() method.
I have already implemented the passing of parameters into the DataAdapter and also implemented properties in the subreport to store the parameters being passed from the main report. As so:
public partial class PersonalSubReport : Telerik.Reporting.Report |
{ |
private int _paramOid; |
private int _paramMemberId; |
public PersonalSubReport() |
{ |
/// <summary> |
/// Required for telerik Reporting designer support |
/// </summary> |
InitializeComponent(); |
// TODO: This line of code loads data into the 'dsMemberPersonalDetails.dsMemberPersonalDetailsTable' table. You can move, or remove it, as needed. |
try |
{ |
this.dsMemberPersonalDetailsTableAdapter1.Fill((this.dsMemberPersonalDetails.dsMemberPersonalDetailsTable), _paramOid, _paramMemberId); |
} |
catch (System.Exception ex) |
{ |
// An error has occurred while filling the data set. Please check the exception for more information. |
System.Diagnostics.Debug.WriteLine(ex.Message); |
} |
} |
public int ParamOid |
{ |
get |
{ |
return _paramOid; |
} |
set |
{ |
_paramOid = value; |
} |
} |
public int ParamMemberId |
{ |
get |
{ |
return _paramMemberId; |
} |
set |
{ |
_paramMemberId = value; |
} |
} |
My question is....when do I set the properties?
I tried setting them in the main report sections item databinding event but this occurs after the subreport's DataAdapter.Fill() method is called so parameters being passed are 0 and no data is being returned in the subreport.
Many thanks.