Results 1 to 2 of 2

Thread: ASP Charts

  1. #1
    Join Date
    Oct 2003
    Location
    London
    Posts
    341

    Question Unanswered: ASP Charts

    Hi there,

    I have an ASPX page that is retrieving data from a database using the following;

    Code:
    <%Dashboard_CurrentStaff()%>
    <script language="VB" runat="server">
    Sub Dashboard_CurrentStaff
    Dim oDR as System.Data.SQLClient.SQLDataReader
    Dim oCom As System.Data.SQLClient.SqlCommand
    Dim oConn as System.Data.SQLClient.SQLConnection
    
    Try
    oConn = New System.Data.SQLClient.SQLConnection ("server=ServerName; initial catalog=DATABASE;uid=USERID;pwd=PASSWORD")
    oConn.Open()
    oCom = New System.Data.SQLClient.SqlCommand()
    oCom.Connection = oConn
    oCom.CommandText = "SELECT department, count(emp_no) as count, Round(sum(fte),2) as fte FROM Dashboard_CurrentStaff group by department order by department "
    oDR = oCom.ExecuteReader()
    
    While oDR.Read
    
       response.Write(oDR.Item("department"))
       response.Write(oDR.Item("count"))
       response.Write(oDR.Item("fte"))
       response.write("<BR>")
    
    End While
    
    Catch
    Response.Write("Error:" & err.Description)
    Finally
    oDR = Nothing
    oCom = Nothing
    oConn.Close()
    oConn = Nothing
    End Try
    End Sub
    </script>

    This shows a simple table with 5 departments, the number of people and the sum of the fte for each department.

    I would love to create a chart to represent this but i simply cannot understand what I'm reading online. I don't need anything fancy, just a simple starting point.

    Can someone help me to build a chart to display on this page?

    Thank you

    Christy

  2. #2
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    I've not done any charting in ASP.NET but here's where I would start: http://www.4guysfromrolla.com/articles/072209-1.aspx
    They seem to cover all the basic aspects.

    Have a read and a play and ask if something isn't clear
    George
    Home | Blog

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •