Page 1 of 1

Adding sql connection to dictionary of the report

Posted: Thu Jan 21, 2010 3:31 am
by suhas.tjs
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

Adding sql connection to dictionary of the report

Posted: Thu Jan 21, 2010 9:36 am
by Andrew
Hello,

Automatically data sources will appear only in ADO.NET DataSet. If you use SqlConnection then you need to manually create data sources and write queries.

Thank you.