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
connection to database
Hello,
You can add the following code:
Thank you.
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();
-
- Posts: 35
- Joined: Tue Nov 09, 2010 2:43 pm
- Location: iran
connection to database
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 ??!
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
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
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