This is an old revision of the document!
You can avoid creating a data model XML file through Data Model Editor utility and fill your model right in the code directly from your database (or more precisely: by its meta-info).
To perform this task you just need to create an appropriate instance of DbGate class (depending on DB and connection type you use), connect it to your database and call FillByDbGate() method of DbModel.
Here is an example:
//clear current model model.Clear(); //add default operators model.AddDefaultOperators(); //create DbGate instance (this one is for SqlConnection, you can use also OleDbGate, OdbcGate, OracleGate, etc). Korzh.EasyQuery.DataGates.SqlClientGate sqlGate = new Korzh.EasyQuery.DataGates.SqlClientGate(); //connect DbGate object to your database sqlGate.ConnectionString = @"Data Source=localhost;Initial Catalog=NWind;Integrated Security=True"; sqlGate.Connected = true; //fill the model model.FillByDbGate(sqlGate, FillModelOptions.Default); //update visual controls queryPanel1.UpdateModelInfo(); columnsPanel1.UpdateModelInfo();
Please note: To create some DbGate object (like SqlClientGate) will need to add a corresponding assembly into the “References” section of your project. For example to execute the code listed above you will need to reference Korzh.EasyQuery.DataGates.NET40.dll assembly.
Discussion
For default settings it is:
C:\Program Files\Korzh.NET\assemblies\NET40
"Cannot find a path between tables ‘XYZ’ and ‘VSY’ ".
How can I remove this Error???
queryPanel1.UpdateModelInfo();
columnsPanel1.UpdateModelInfo();
In case of MVC project these lines are not necessary since visual controls in that version are running on client-side as JavaScript widgets.
I am going to make EasyReporting. But I have not any example EasyReporting for ASP.NET MVC.
You are right - we didn't included it yet because it's not finished.
I can send current version to you by email if you would like.
Please, send me!
-------
Thanks!
When do you send EasyReporting demo for ASP.NET MVC?
I wait...
Is it correct address?
Thanks!
I get your message.
Here is the live demo: http://demo.easyquerybuilder.com/ad-hoc-reporting/
The source code for this demo is included into trial version of EasyQuery which you can download here:
http://devtools.korzh.com/easyquery/