Page 1 of 1

connection to database

Posted: Sun Nov 07, 2010 12:25 pm
by feridun
Hi

i use mysql with vs2010

i am trying your product.
what i want to do is filling data from mysqldatareader to report viewer

string constr = ConfigurationManager.ConnectionStrings["Mydb"].ConnectionString;
MySqlConnection Myconnection = new MySqlConnection(constr);
Myconnection.Open();

string mycommand = "Select * from mytable where field1=@field1"
MySqlCommand q_tab = new MySqlCommand(mycommand, mydb);
q_tab.Parameters.AddWithValue("@field1", "123");
MySqlDataReader myrdr = q_tab.ExecuteReader();

then how i assign myrdr to StiWebViewer1 to show my data

best regards

connection to database

Posted: Mon Nov 08, 2010 2:16 am
by Alex K.
Hello,

You can add the following code:

Code: Select all

DataTable dTable = new DataTable("Data");
dTable.Load(myrdr);
StiReport report = new StiReport();
report.RegData(dTable);
report.Dictionary.Synchronize();
Thank you.

connection to database

Posted: Tue Nov 09, 2010 3:07 pm
by hadisaadat_du
Hi every body.
I sea allmost all topic in forum and seem int all of them posit that we know what is our tables and columns in dataset of our reportbut allways not thus
1-sometime we may want to edit the report in webdesigner that we dont know any thing about its data set but we sure it works with our data base , so befor call the design() function we pass what data set to our report via regdata(//what_dataset) ??
2- or we may want to set full access to data base to one user to create the every report that need to design well we pass a full data base to designer dictionary and he/she design every report by every columns in every tables or viwes in database and save it , in viwe report mode namely after load our report and we want to pass it to stiwebviewer we pass what data set to it since we cant pass all data base to our report ??!

connection to database

Posted: Fri Nov 19, 2010 2:18 pm
by feridun
Hi

i add web designer to my project.
when i design the report online the tables and the fields in my mysql database didn't come to designer.
how will add them ??

in this case i wwant to see

mytable from mysql database and field1, field2, field3 ... fields