first of all i am writing the coding which i am using on the click evnet
of the button
where salesgrpah is the name of graph
and graphtype is the combobox where user can select
type of graph
also tell me how to change
from
a1 a2 a3 a4
to
a1
a2
a3
a4
which kadghar suggestion
also qveena how can i use excel chart in vb,i develp my application
in vb and sqlserver 2000 and the pictures i use to show in the link
which i want to be is manually made by me in excel
of the button
Code:
salesrs.Open "SELECT DATENAME(mm, [date]) + ' ' + DATENAME(yy, [date]) AS Months, SUM([total(Credit)]-[total(debit)]) AS Amount FROM sales WHERE ([date] BETWEEN '" & fromdate & "' AND'" & todate & "') GROUP BY DATENAME(mm, [date]) + ' ' + DATENAME(yy, [date]), MONTH([date]), YEAR([date]) ORDER BY YEAR([date]), MONTH([date]) ", con, adOpenStatic, adLockReadOnly Set salesgraph.DataSource = salesrs If graphtype.Text = "Pie Graph" Then salesgraph.ChartType = VtChChartType2dPie ElseIf graphtype.Text = "Bar Graph" Then salesgraph.ChartType = VtChChartType2dBar ElseIf graphtype.Text = "Area Graph" Then salesgraph.ChartType = VtChChartType2dArea End If
and graphtype is the combobox where user can select
type of graph
also tell me how to change
from
a1 a2 a3 a4
to
a1
a2
a3
a4
which kadghar suggestion
also qveena how can i use excel chart in vb,i develp my application
in vb and sqlserver 2000 and the pictures i use to show in the link
which i want to be is manually made by me in excel
Originally posted by QVeen72
Comment