Hello there---
I have just begun to use the Reporting component and have been successful following the tutorials up to the dynamically binding section... I have been able to create a report that uses data from the database (by way of the TableAdapter... DataSource Wizard) and implement it within an ASP.NET web page, but now that I am trying to bind the report to a DataSet object using the code-behind, the report is no longer populating with data. No errors are thrown, it is just not populating with data. I have verified that the query string used does generate rows by going directly the SQL db and testing the query there.
I am building the DataSet in the constructor of the report and noticed in the documentation that the Preview feature will not populate the report, but even when I run the report within the context of the web app, I still do not see the data for the report. When I set the breakpoint in the constructor of the code-behind, it never hits the breakpoint, so I am not sure how to go about debugging the report itself.
Here is the code that binds the DataSet to the report.
I have also tried just binding directly to the DataAdapter as an alternative (following the tutorial's alternative).
Any help would be great!
Thanks!
---Keith
I have just begun to use the Reporting component and have been successful following the tutorials up to the dynamically binding section... I have been able to create a report that uses data from the database (by way of the TableAdapter... DataSource Wizard) and implement it within an ASP.NET web page, but now that I am trying to bind the report to a DataSet object using the code-behind, the report is no longer populating with data. No errors are thrown, it is just not populating with data. I have verified that the query string used does generate rows by going directly the SQL db and testing the query there.
I am building the DataSet in the constructor of the report and noticed in the documentation that the Preview feature will not populate the report, but even when I run the report within the context of the web app, I still do not see the data for the report. When I set the breakpoint in the constructor of the code-behind, it never hits the breakpoint, so I am not sure how to go about debugging the report itself.
Here is the code that binds the DataSet to the report.
public ProjectListWeb() |
{ |
/// <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 'projectDataSet.ProjectDataSetTable' table. You can move, or remove it, as needed. |
try |
{ |
_queryStr = @"..."; //query that returns data rows |
SqlConnection conn = new SqlConnection(System.Configuration.ConfigurationSettings.AppSettings[0].ToString()); |
SqlCommand comm = new SqlCommand(_queryStr, conn); |
DataSet dsProjects = new DataSet(); |
SqlDataAdapter adp = new SqlDataAdapter(comm); |
adp.Fill(dsProjects); |
this.DataSource = dsProjects; |
this.DataMember = dsProjects.Tables[0].ToString(); |
} |
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); |
} |
} |
I have also tried just binding directly to the DataAdapter as an alternative (following the tutorial's alternative).
Any help would be great!
Thanks!
---Keith