Page 1 of 1

How to Call a stored procedure using WebChart in a Webform

Posted: Mon Sep 10, 2007 12:30 pm
by 9640703
Hello 8) ,

I am starting to get some charts in Webform using WebChart. I need to call a stored procedure to load the data in the chart. All sample examples shows either using FillSampleValues() method or uses Winforms. Please give a demo of how to call a stored procedure using WebChart in Webform.

Thanks
Gagan

Posted: Mon Sep 10, 2007 1:22 pm
by narcis
Hi Gagan,

You might be interested in using BindingSource to connect your charts to a database as describe here. When creating a datasource you can select the database objects you want to use.

You may also be interested in Tutorial8 - ADO.NET Database Access. You'll find tutorials at TeeChart's program group.

Hope this helps!

Posted: Mon Sep 10, 2007 2:06 pm
by 9640703
Narcís,

Thanks for your reply. I have been following the Tutorial 8. But as I told that I am using a WebForm and not a Winform so instead of OleDbDataAdapter I am using SQLDataSource control to make connection to the database. But when I go to the Chart Editor, Series Tab then Data Source tab and select Database from the dropdown the Dataset dropdown list remains empty. Please guide as to what I am missing here.

Thanks
Gagan

Posted: Mon Sep 10, 2007 2:26 pm
by narcis
Hi Gagan,

Sorry, my bad, I forgot about you were using WebForms. In that case, there's not design-time support for datasources. At this thread I discussed this with other clients and one of them posted the code they used.

Posted: Mon Sep 10, 2007 3:41 pm
by 9640703
Narcís,

Thanks for the reply. The posted code helped me in making it work in a Webform. Could you please tell how to get the axes values printed on the graph and also different graph values in the coordinate?

Thanks!
Gagan

Posted: Wed Sep 12, 2007 9:19 am
by narcis
Hi Gagan,

For axes values to appear you need to add, at least, one series to the chart and populate it with values. Have you done so?

Thanks in advance.