Hi,
I have a table in wich the datasource is loaded in the NeedDataSource event. It's using a Stored Procedure wich requires as parameter a value that is available in the main report. How do I access this value ?
I want to either get the value of textbox txtIndividualId or the field IndividualId from the Reports datasource...
Thanks
I have a table in wich the datasource is loaded in the NeedDataSource event. It's using a Stored Procedure wich requires as parameter a value that is available in the main report. How do I access this value ?
I want to either get the value of textbox txtIndividualId or the field IndividualId from the Reports datasource...
Thanks
private void MyTable_NeedDataSource(object sender, EventArgs e) |
{ |
SqlCommand sqlSelectCommand = new SqlCommand |
{ |
CommandText = "SP_MyStoredProc", |
Connection = new SqlConnection {ConnectionString = ConnectionString}, |
CommandType = CommandType.StoredProcedure |
}; |
sqlSelectCommand.Parameters.Add("@individualId", SqlDbType.Int); |
sqlSelectCommand.Parameters["@individualId"].Value = txtIndividualId.Value; //This is incorrect |
Telerik.Reporting.Processing.Table tbl = (Telerik.Reporting.Processing.Table)sender; |
tbl.DataSource = new SqlDataAdapter { SelectCommand = sqlSelectCommand }; |
} |