Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Graphing That Works
Message
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Graphing That Works
Divers
Thread ID:
00677744
Message ID:
00677744
Vues:
52
Hey Everybody

I just thought I share something for those interested. I found a graph/chart control that works on webforms.
The cool part is this thing registers in the .net IDE and you can just drop it on the webform. One you do it fires up a wizard to set things like graph type, colors and titles. Below is the code I'm using to populate it with the data from a sql table.
  lcConnectionString ="provider=sqloledb.1;server=cqi-termserv;uid=ctore;pwd=catdogexpress;database=sqlversion"
  Dim lcSQL As String
  Dim oConn As OleDb.OleDbConnection
  Dim oCommand As New OleDb.OleDbCommand()
  Dim dvYTD As DataView
  Dim myReader As OleDb.OleDbDataReader

  oCommand.CommandText = "ytd_SurgeonCntMinutes"
  oCommand.CommandType = CommandType.StoredProcedure
  Dim cDocID As String
  cDocID = Session("UserID")

 ' Build the Parameter list
  Dim oParam1 As New OleDb.OleDbParameter("@t_Command",OleDb.OleDbType.Integer)
  oParam1.Value = 2002
  oCommand.Parameters.Add(oParam1)

  Dim oParam2 As New OleDb.OleDbParameter("@t_Command",OleDb.OleDbType.Integer)
  oParam2.Value = Integer.Parse(cDocID)
  oCommand.Parameters.Add(oParam2)

  oConn = VFPToolkit.vfpData.SqlConnect(lcConnectionString)

  oCommand.Connection = oConn

  dvYTD = VFPToolkit.vfpData.SqlExecute(oConn, oCommand, "actview")

  DataGrid1.DataSource = dvYTD
  DataGrid1.DataBind()

  myReader = oCommand.ExecuteReader()
  Chart1.DataSourceSettings.DataSource = myReader

  VFPToolkit.vfpData.SqlDisConnect(oConn)
I'm not trying to sell it, but it is hard to find things that actually work the first time. This was something that did.
Pretty cool, it's the first one I've seen that actually works without having to do all the system.draw functions.
Répondre
Fil
Voir

Click here to load this message in the networking platform