Counting number of fields.. and more... (long)

Results 1 to 2 of 2

Thread: Counting number of fields.. and more... (long)

  1. #1
    Unbelievably Confused Guest

    Default Counting number of fields.. and more... (long)

    Hello,<BR><BR> Ok, where to begin? I am trying to write a bar graph that depicts how many members we have in our club, broken down by region. I understand how to write regions, and the number of members in each region. This is the code I am using to do this:<BR><BR>&#039;count total members in each region<BR>sub RegionTotals<BR> strSQL = "SELECT Region, Count(Region) AS RegionCount FROM membersrides GROUP BY membersrides.Region;"<BR> set objRSTemp = Server.CreateObject("ADODB.Recordset") <BR> strSQL, objConn, adOpenKeyset<BR><BR> Do While Not objRSTemp.EOF<BR> Response.Write "&#060;tr&#062;"<BR> Response.Write "&#060;td width=""75""&#062;&#060;A CLASS=""smallwhite""&#062;" & objRSTemp.fields("Region") & "&nbsp;&#060;/A&#062;&#060;/td&#062;"<BR> Response.Write "&#060;td align=""left""&#062;&#060;A CLASS=""smallwhite""&#062;" & objRSTemp.fields("RegionCount") & "&#060;/A&#062;<BR>&#060;/td&#062;"<BR> Response.Write "&#060;/tr&#062;"<BR> objRSTemp.MoveNext<BR> Loop<BR>end sub<BR>&#039;counting total members in each region<BR><BR> Using this code, my page displays each region we have members in, and how many members are in that region. Good, great, grand. That works perfect. Now is where I get my brians scrambled.<BR><BR> I want to write a bar graph for this information also. I found (on this site) a class for bar graphs. The trouble is that this class asks for the information like so:<BR><BR>Dim objChart<BR>Dim arrRegions<BR>Dim arrRegionCount<BR>Set objChart = New BarChart<BR>With objChart<BR> .chartBGcolor = "#5a5a5a"<BR> .chartTitle = ""<BR> .chartWidth = "160"<BR> .chartValueArray = array(20,60,30,18)<BR> .chartLabelsArray = array("Yes", "No", "Maybe", "Dunno")<BR> .chartColorArray = array("#FF6600" , "#ff6600" , "#ff6600")<BR> .chartViewDataType = "V"<BR> .chartBarHeight = 10<BR> .chartTextColor = "#ffffff"<BR>END WITH<BR>&#039;Draw the chart!<BR>objChart.Draw<BR>Set objChart = Nothing<BR><BR> My question is: How do I write the regions into an array? How do I write the number of members in that region into a corrisponding array? I have tried a couple "do while not"&#039;s, but I am extremely new to ASP, and have been unsucessful in my attempts. If any can point me to any documentation or tutorials which may help me to write this information to an array, I would be more than greatful.

  2. #2
    Not Confused Guest

    Default I got it! disregard the above post!


Posting Permissions

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