Buenas tardes por favor si alguien podría apoyarme con esto:
lo que que deseo es cargar mediante conexión Ado, un conjunto de registros a una imagen Chart de Gigasoft. a la vez que me agrupe, los tipos de cobros por la venta(tarjeta, efectivo, etc), también por mes y año según el rango ingresado en DatePicker1 hasta DatePiker2.
la conexion que uso actualmente es:
'{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{
Public Sub CreateSimpleGraph2()
'//! Right button click to show popup menu. //
'//! Double Click to show customization dialog. //
'//! Left-Click and drag to draw zoom box. Use popup memu or 'z' to undo zoom. //
'// Simple example show the basics of a graph object. //
'// Graph's generally only contain YData because we assume
'// data is plotted equally spaced left to right.
Dim Meses As Integer
Dim S As Long
Dim p As Long
Dim sql3 As String
Dim Rs3 As ADODB.Recordset
Dim strDesde As String
Dim strHasta As String
strDesde = "#" & Format(DTPInicio, "mm/dd/yyyy") & "#"
strHasta = "#" & Format(DTPFinal, "mm/dd/yyyy") & "#"
'If Rs.State = 1 Then Rs.Close
Meses = DateDiff("m", DTPInicio, DTPFinal)
'Dim db As Database
'Dim MyRS As DAO.Recordset
'Dim MySQL As String
'MySQL = "select Field1, Field2, Field3 from Table1"
'Set db = CurrentDb()
'Set MyRS = db.OpenRecordset(MySQL)
''''''''''''
sql3 = "SELECT FORMADEPAGOVenta, year(FECHAVENTA) as Año , SUM(MONTOTOTALVENTA)as ventas , format(FechaVenta,'mmmm') as MES FROM DATOSVENTAFACTURA WHERE FECHAVENTA BETWEEN" & strDesde & " AND " & strHasta & _
" GROUP BY FORMADEPAGOVenta,year(FECHAVENTA),format(FechaVenta,'mmmm');"
'sql = "SELECT * FROM PBG WHERE (Date < CDbl(CDate('6/6/1999'))) ; "
Set Rs3 = CreateObject("ADODB.Recordset")
Rs3.Open sql3, ConexionVenta, 1, 1
'// Enable Bar Glass Effect //
Pego2.SubsetByPoint = True
Rs3.MoveLast
Rs3.MoveFirst
Pego2.Subsets = Rs3.RecordCount '2
Pego2.Points = Meses + 1 '10000#
Dim SS As Integer
Pego2.MainTitle = "Hello World"
Pego2.SubTitle = ""
'''''''''
Dim nCount As Integer
Dim NCount1 As Integer
Do While (Rs3.EOF = False)
For SS = 0 To Rs3.RecordCount '2
Pego2.YData(0, nCount) = Rs3("VENTAS")
'Pego2.YData(nCount, SS) = Rs3("VENTAS")
Pego2.PointLabels(nCount) = Rs3("MES") & " - " & Rs3("Año")
Pego2.SubsetLabels(NCount1) = Rs3("FORMADEPAGOVenta") '"For .Net Framework"
Next SS 'NCount1
nCount = nCount + 1
NCount1 = NCount1 + 1
Rs3.MoveNext
Loop
Pego2.Points = Meses + 1
'Pego2.Points = nCount
'Dim nCont As Integer
'nCont = nCont + 1
Pego2.PEactions = 0
Pego2.YAxisLabel = "Simple Quality Rendering"
'Pego2.SubsetColors(0) = Pego2.PEargb(60, 0, 180, 0)
'Pego2.SubsetColors(1) = Pego2.PEargb(180, 0, 0, 130)
Pego2.BitmapGradientMode = True
Pego2.QuickStyle = PEQS_LIGHT_SHADOW
Pego2.DeskColor = Pego2.PEargb(255, 255, 255, 255)
Pego2.GraphPlusTable = PEGPT_BOTH
Pego2.DataPrecision = PEDP_TWODECIMALS
Pego2.LabelBold = True
Pego2.PlottingMethod = GPM_BAR
Pego2.GradientBars = 8
Pego2.BarGlassEffect = True
Pego2.LegendLocation = PELL_RIGHT ' PELL_LEFT
Pego2.DataShadows = PEDS_3D
Pego2.FontSize = PEFS_LARGE
Pego2.PrepareImages = True
Pego2.CacheBmp = True
Pego2.RenderEngine = PERE_DIRECT2D
Pego2.AntiAliasGraphics = True
Pego2.AntiAliasText = True
Pego2.AllowDataHotSpots = True
Pego2.PEactions = REINITIALIZE_RESETIMAGE
Rs3.Close
Set Rs3 = Nothing
End Sub
Similar a la imagen
Muchas Gracias
gigasoft:
https://downloadly.ir/software/programming/proessentials/