Hi,
I've added two datasources to my report project. the first one is for the report itself, the second one for a chart.
Please see the code below.
The first datasource connects perfectly. The second doesn't. They make use of the same ConnectionString.
The error is:
Any ideas?
Thnx,
Robert
I've added two datasources to my report project. the first one is for the report itself, the second one for a chart.
Please see the code below.
<connectionStrings> <add name="ReportPlugin.Properties.Settings.Development"connectionString="Data Source=*****;Initial Catalog=*****;Integrated Security=True" providerName="System.Data.SqlClient" /> </connectionStrings>// // sqlDataSource1// this.sqlDataSource1.ConnectionString = "ReportPlugin.Properties.Settings.Development";this.sqlDataSource1.Name = "sqlDataSource1";this.sqlDataSource1.SelectCommand = resources.GetString("sqlDataSource1.SelectCommand");// // sqlDataSource2// this.sqlDataSource2.ConnectionString = "ReportPlugin.Properties.Settings.Development";this.sqlDataSource2.Name = "sqlDataSource2";this.sqlDataSource2.Parameters.AddRange(new Telerik.Reporting.SqlDataSourceParameter[] {new Telerik.Reporting.SqlDataSourceParameter("country.id", System.Data.DbType.Int32, "=Parameters.CountryId.Value")});this.sqlDataSource2.SelectCommand = resources.GetString("sqlDataSource2.SelectCommand");
private void chart1_NeedDataSource(object sender, EventArgs e){ Telerik.Reporting.Processing.Chart chart = sender as Telerik.Reporting.Processing.Chart; chart.DataSource = sqlDataSource2;}The first datasource connects perfectly. The second doesn't. They make use of the same ConnectionString.
The error is:
Any ideas?
Thnx,
Robert