Click here to Skip to main content
15,616,639 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I have a table. In table there are many columns such As prod_name,prod_quan,delivery_date,uname and many more..I am having three products.
Here i want to display in a chart monthwise product distribution....what should i do
Updated 23-Sep-12 19:26pm
Abhijit Parab 24-Sep-12 1:28am    
What is the format of your output? .pdf,excel,text or what?
U can acheive this by SSRS(SQl Server Reporting service).
Rashid Choudhary 24-Sep-12 2:23am    

Look at either Crystal Reports[^] or SSRS[^]

Depending on the version of your Visual Studio, the former may come with it.
Share this answer
u need it in crystal reports or any other way?
Share this answer
This is the coding for bar chart
Dim mydataconnection As New OleDbConnection(ConfigurationManager.ConnectionStrings("DBO").ConnectionString)

       Dim cmd As String = "select prod_name,prod_quan,delivery_date,uname and many more from table1& where date between #stardate# and #enddate#"
       Dim mycommand As New OleDbCommand(cmd, mydataconnection)
       Dim mydataadapter As New OleDbDataAdapter(mycommand)
       'Dim mydataset As New DataTable
       Chart1.DataSource = mycommand.ExecuteReader(CommandBehavior.CloseConnection)

       ' Set series members names for the X and Y values
       ' set series members names for the X and Y values as u need 
       Chart1.Series("Series1").XValueMember = " prod_name"

       Chart1.Series("Series1").YValueMembers = "prod_quan"

       ' Data bind to the selected data source
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900