public PatientReport()
{
/// <summary>
/// Required for telerik Reporting designer support
/// </summary>
InitializeComponent();
//
// TODO: Add any constructor code after InitializeComponent call
//
// TODO: This line of code loads data into the 'pCGProduction211009DataSet.PCGProduction211009DataSetTable' table. You can move, or remove it, as needed.
try
{
this.pcgProduction211009DataSetTableAdapter1.Fill(this.pCGProduction211009DataSet.patient);
}
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);
}
}
but when i try to bind through the NeedDataSource event with the following code:
public
PatientReport()
{
/// <summary>
/// Required for telerik Reporting designer support
/// </summary>
InitializeComponent();
DataSource =
null;
}
private PCGProduction211009DataSet.patientDataTable GetData()
{
using (patientTableAdapter adapter = new patientTableAdapter())
{
var data = adapter.GetData();
return data;
}
}