PLEASE REFER TO MY STACK OVERFLOW QUESTION FOR DETAILED EXPLANATION.
http://stackoverflow.com/questions/20039340/binding-data-to-a-telerik-report
I'm using ASP.NET MVC with telerik reporting. I'm trying to bind data to a dataset, which is assigned to a telerik report.
I have tried with below code but data is not showing up.
http://stackoverflow.com/questions/20039340/binding-data-to-a-telerik-report
I'm using ASP.NET MVC with telerik reporting. I'm trying to bind data to a dataset, which is assigned to a telerik report.
I have tried with below code but data is not showing up.
private void Report1_ItemDataBound(object sender, EventArgs e)
{
SqlDataAdapter adapter = new SqlDataAdapter();
rep = new reportRepository();
List<ReportViewModel> model = rep.GetData();
// Creating and configuring the ObjectDataSource component:
var objectDataSource = new Telerik.Reporting.ObjectDataSource();
objectDataSource.DataSource = dsConvertion.ToDataSet(model); // GetData returns a DataSet with three tables
objectDataSource.DataMember = "tblFirst"; /// Indicating the exact table to bind to. If the DataMember is not specified the first data table will be used.
// Creating a new report
Telerik.Reporting.Report report = new Telerik.Reporting.Report();
// Assigning the ObjectDataSource component to the DataSource property of the report.
report.DataSource = objectDataSource;
// Use the InstanceReportSource to pass the report to the viewer for displaying
Telerik.Reporting.InstanceReportSource reportSource = new Telerik.Reporting.InstanceReportSource();
reportSource.ReportDocument = report;
}