Hi,
I want to display the data into telerik report viewer control through the Linq with stored procedure.
I have tried this but not get the success.
Telerik report viewer showing as blank.
I used this source code also without LInq
Telerik.Reporting.ObjectDataSource objectDataSource = new Telerik.Reporting.ObjectDataSource();
objectDataSource.DataSource = GetAllData(); // GetData returns a DataSet with three tables
objectDataSource.DataMember = "VehiclePlanInformation"; /// Indicating the exact table to bind to. If the DataMember is not specified the first data table will be used.
// objectDataSource.CalculatedFields.Add(new Telerik.Reporting.CalculatedField("PlanCode", typeof(string), "=Fields.PlanCode")); // Adding a sample calculated field.
// Creating a new report
Telerik.Reporting.Table report = new Telerik.Reporting.Table();
// Assigning the ObjectDataSource component to the DataSource property of the report.
report.DataSource = objectDataSource;
// Assigning the report to the report viewer.
ReportViewer1.Report =(Telerik.Reporting.IReportDocument)report;
// Calling the RefreshReport method (only in WinForms applications).
ReportViewer1.RefreshReport();
but not get the success.
Please suggest me. Its urgent for me.
Thanks
Vikas
I want to display the data into telerik report viewer control through the Linq with stored procedure.
I have tried this but not get the success.
Telerik report viewer showing as blank.
I used this source code also without LInq
Telerik.Reporting.ObjectDataSource objectDataSource = new Telerik.Reporting.ObjectDataSource();
objectDataSource.DataSource = GetAllData(); // GetData returns a DataSet with three tables
objectDataSource.DataMember = "VehiclePlanInformation"; /// Indicating the exact table to bind to. If the DataMember is not specified the first data table will be used.
// objectDataSource.CalculatedFields.Add(new Telerik.Reporting.CalculatedField("PlanCode", typeof(string), "=Fields.PlanCode")); // Adding a sample calculated field.
// Creating a new report
Telerik.Reporting.Table report = new Telerik.Reporting.Table();
// Assigning the ObjectDataSource component to the DataSource property of the report.
report.DataSource = objectDataSource;
// Assigning the report to the report viewer.
ReportViewer1.Report =(Telerik.Reporting.IReportDocument)report;
// Calling the RefreshReport method (only in WinForms applications).
ReportViewer1.RefreshReport();
but not get the success.
Please suggest me. Its urgent for me.
Thanks
Vikas