Adding sql connection to dictionary of the report

Stimulsoft Reports.NET discussion
Post Reply
suhas.tjs
Posts: 4
Joined: Thu Jan 14, 2010 3:10 am
Location: Bangalore

Adding sql connection to dictionary of the report

Post 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
Andrew
Posts: 4109
Joined: Fri Jun 09, 2006 3:58 am

Adding sql connection to dictionary of the report

Post 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.
Post Reply