help!! data binding

Сonversation on different topics
Post Reply
makgod
Posts: 3
Joined: Mon Jul 30, 2007 5:00 am
Location: cyber space

help!! data binding

Post by makgod »

i need help in using the stimulsoft product.
In the second part of the tutorial, "how to bind data" i dont understand how the data was called from the database. i spent the whole day trying to do this...
help!! anyone.
thanks
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

help!! data binding

Post by Edward »

makgod wrote:i need help in using the stimulsoft product.
In the second part of the tutorial, "how to bind data" i dont understand how the data was called from the database. i spent the whole day trying to do this...
In the second part of the tutorial in the report took place the following actions:
1. Via the code
DataSet myDataSet = new DataSet();
myDataSet.ReadXml("c:\\Demo.xml");

the instance of the DataSet class named myDataSet was created in the code of the Application in runtime. After that the structure and content of the DataSet were loaded by the ReadXml method of the myDataSet.

2. On the form Form1 of the Application existed an object named demo1. It is the DataSet too. This demo1 contains a DataSet with exactly the same structure as provided in c:\\Demo.xml file. The name of the DataSet inside of the dataSet1 is "Demo". This name you saw in the Wizard when the report was created. This DataSet was used for creating in the Dictionary of the report of DataSources from "Demo".
If structure of the DataSet is provided in the other file (usually it has "xsd" extension) then before ReadXML you should call ReadXMLSchema method and then ReadXML.

3. Method RegData in runtime assigns an instance of the DataSet to the appropriate DataSource in the Dictionary. As we registered our DataSet with "Demo" name in the Designer's Dictionary, then we must register runtime-built dataset only with "Demo" name. After that the DataSources of the report will be connected to actual Data.

So please check the name of dataset in the report and the name of the dataset which is registered with RegData().

In the latest prerealise version of the StimulReport.Net RegData() uses new mechanism of associating the existed Dictionary (stored in the report template) with DataStore (here the real data is registered and stored). So please download the prerealise version 2007.2 and there your issue with registering of the Datasources may dissapear.
It is the most popular issue which our new customers met when they use StimulReport.Net for the very first time :)

Thank you.
makgod
Posts: 3
Joined: Mon Jul 30, 2007 5:00 am
Location: cyber space

help!! data binding

Post by makgod »

Thanks very much for ur time. I'll use part of today to work on that, and will let u know if i encounter anymore problems.
thanks
makgod
Posts: 3
Joined: Mon Jul 30, 2007 5:00 am
Location: cyber space

help!! data binding

Post by makgod »

sorry for disturbing again... , the demo.xml, which server was it exported from? because i am trying to export from sql server, and i still get the error saying that " i should verify the source cuz the source was not found"

or maybe i am missing sumthing out. "on the design page , how was 'demo' dragged to the side of 'stiReport1'


Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

help!! data binding

Post by Edward »

The demo.xml was stored from the DataSet object via
dataSet.WriteXMLSchema() and dataSet.WriteXML().
Into the DataSet data was filled by the
sqlDataAdapter.Fill(dataSet) method. The database - NorthWind.mdb (Access).

If you are working with Sql Server and schema of the data, please see also the following flash tutorials:

http://www.stimulsoft.com/livedemos/Rep ... erver.html
and
http://www.stimulsoft.com/livedemos/dat ... igner.html

Thank you.
hadisaadat_du
Posts: 35
Joined: Tue Nov 09, 2010 2:43 pm
Location: iran

help!! data binding

Post 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 ??!
Post Reply