I want to set the DataSource parameters at Webforms runtime so I created a DataSource with the code below. Hos do I attached this to the report before setting the ReportViewer reportSource? I can create a Report object and set the DataSource but how do I assign it to the reportsource which is set to the viewer?
Telerik.Reporting.SqlDataSource sqlDataSource = new Telerik.Reporting.SqlDataSource();
sqlDataSource.SelectCommand = "SELECT * FROM VerifiedComponents WHERE ItemNumber = @ItemNumber";
sqlDataSource.Parameters.Add("@ItemNumber", System.Data.DbType.String, "14545454545");
Telerik.ReportViewer.Html5.WebForms.ReportSource reportSource = new Telerik.ReportViewer.Html5.WebForms.ReportSource();
reportSource.IdentifierType = Telerik.ReportViewer.Html5.WebForms.IdentifierType.TypeReportSource;
reportSource.Identifier = typeof(Report1).AssemblyQualifiedName;
reportViewer1.ReportSource = reportSource;