Adding sql connection to dictionary of the report
Posted: Thu Jan 21, 2010 3:31 am
Hi all,
I am trying to add a sql database to reports.
i refered one of the posts where they have sone the same using oledb.
But when did same thing using System.Data.SqlClient.SqlConnection, the datasource is not shown in the Dictionaries.
StiReport report = new StiReport();
report.Dictionary.DataStore.Clear();
System.Data.SqlClient.SqlConnection connection =
new System.Data.SqlClient.SqlConnection(@"Data Source=SKELTADTP108\SQLEXPRESS;Initial Catalog=EmployeeDS;Integrated Security=True");
report.RegData("EmployeeDS","", connection);
report.Compile();
StiWebDesigner1.Design(report);
Please give me a solution.
Thanks
I am trying to add a sql database to reports.
i refered one of the posts where they have sone the same using oledb.
But when did same thing using System.Data.SqlClient.SqlConnection, the datasource is not shown in the Dictionaries.
StiReport report = new StiReport();
report.Dictionary.DataStore.Clear();
System.Data.SqlClient.SqlConnection connection =
new System.Data.SqlClient.SqlConnection(@"Data Source=SKELTADTP108\SQLEXPRESS;Initial Catalog=EmployeeDS;Integrated Security=True");
report.RegData("EmployeeDS","", connection);
report.Compile();
StiWebDesigner1.Design(report);
Please give me a solution.
Thanks