Adding Graphs to Forms

042355C

Active member
Joined
Nov 30, 2006
Messages
30
Programming Experience
Beginner
Hi to all,

I am doing a windows application programme on Health using vb.net 2003. Right now, my task is to create a graph to display the number of people within a range of blood pressure. The number of people is in my database(ODBC).

I really really need help in this. All the websites I visit needs me to enter the exact value, which means I will have to change when the number in database changes.

Is there anyway to create a graph whereby it will correspond according the the database?

Thanks a million!
 
Last edited:
mate, you need to give a bit more information...

ie.
what database server are you using?

are there any limitations posed by the client?

i would also suggest that you phrase your posts a bit more politely as it sounds like you giving a command...telling us to write your program.

but in answer to your question, there are plenty of ways to do it. but like i said you need to give a bit more info, if you were usign sql server 2005 i would say use sql server reporting services as it includes a charting functionality

have a good one
adam
 
what database server are you using?
I'm using ODBC Database, connection through SQL Server.

are there any limitations posed by the client?
No Limitations

i would also suggest that you phrase your posts a bit more politely as it sounds like you giving a command...telling us to write your program.
Sorry for that. I rephrased it already, hope it sounds more friendly?

but in answer to your question, there are plenty of ways to do it. but like i said you need to give a bit more info, if you were usign sql server 2005 i would say use sql server reporting services as it includes a charting functionality
However, I am suppose to show the chart in a Form.

have a good one
adam
Thanks.
 
why odbc? wouldnt it be better to use the sqlclient classes and methods?

haha, yes that post sounds a lot better. hope i didnt sound like a prick either :eek:

you can easily put a webbrowser control within the form itself, and when you want to run the chart, run it from the browser within the form.

i have tried this myself and it does work perfectly. that way, you can see the reports from the form

hope it helps mate
 
I'd suggest getting NPlot or ZedGraph, which are free, third-party charting components. You should be using SqlClient to interact with your database rather than OdbcClient, but that has nothing to do with the graphs. All that matters is that you have your data. Where it came from is immaterial.

Note that the newest versions of both those components are for .NET 2.0 I believe. You'll need to download a slightly older version to get .NET 1.1 support.
 
why odbc? wouldnt it be better to use the sqlclient classes and methods?
No choice, I have to use odbc, sobx.

haha, yes that post sounds a lot better. hope i didnt sound like a prick either :eek:
nope you don't. ;)

you can easily put a webbrowser control within the form itself, and when you want to run the chart, run it from the browser within the form.
But mine is a windows application. how to use webbrowser control? :confused:
 
Last edited:
I'm sorry but I have 2 problems to this.
1) I have to get the value of the histogram from the ODBC Database. The graph has to alter itself as the value in the database changes.
2) I do not understand the code, therefore unable to modify it to suit my needs.

Is anyone able to lend me a helping hand?:(
 
i know that you traditionally cant put a web browser within a form, but some pretty smart bugger has created a control in the vs.net environment. what you need to do is right click on your control toolbar (where you drag text boxes and the like to the form) click 'choose items', when it loads click the com components and scroll down until you find the web browser control. once you have added this to the toolbox, you can create an in-form webpage of any size you want, and simply use the navigate method of the control to navigate to a report on the report server. and PRESTO... web stuff within win32!

i would suggest upgrading to 2005 (both sql server, sql reporting services, and vs.net)

have a good one mate
 
Thanks, but I still cannot find web browser control. It only has WebViewItemClass. I can't upgrade to vs.net 2005 since my school doesn't have it :(
 
sorry, i should have been more specific... go back to the com components tab when choosing items for the toolbox and look for 'Microsoft Web Browser'

hope you have more luck
 
sorry, i should have been more specific...
it's ok, I should have gone through all of it slowly :p

thanks for your help.go back to the com components tab when choosing items for the toolbox and look for 'Microsoft Web Browser'

hope you have more luck
Yes! I got it! I feel like I'm one step ahead already, hehe.
 
Last edited:
But now, I have another problem. You see, I retrieved the information needed into various textboxes. But how do I use those values to get the chart? How to make the chart(Histogram to be exact). I solved one problem, and there comes another. :eek:
 
Back
Top