Need Chart Example Program

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jpezhil
    New Member
    • Sep 2006
    • 9

    Need Chart Example Program

    Hello Friends & My Brothers
    I Need Chart Example Program In Vb Plz Send Me
    - Jpezhil
    Thanking U(For U'r Reply)
  • deepakpb
    New Member
    • Sep 2006
    • 5

    #2
    add a MSChart control in ur application by
    project->components->microsoft chart control
    put a char in the form and
    here i changed the name of chart control to cht and i use the able


    With cht
    .RowCount = 0
    .ColumnCount = 0

    If cmbName.ListInd ex = -1 Then
    sql = "Select Code,StockQty,( PrPrice * StockQty) As val from MstItem Where stockqty > 0 and void =0"
    Else
    sql = "Select Code,StockQty,( PrPrice * StockQty) As val from MstItem Where stockqty > 0 and void =0 and catcode='" & cmbName & "'"
    End If

    If RS.State Then RS.Close
    RS.Open sql, CON, 1, 3
    If RS.RecordCount < 1 Then
    MsgBox "There is no item.", vbInformation, "Data not found"
    If RS.State Then RS.Close
    Exit Sub
    End If

    .RowCount = 1
    .ColumnCount = RS.RecordCount
    For I = 1 To RS.RecordCount
    .Column = I
    .ColumnLabel = RS("code")
    .Data = RS("StockQty")
    ' RS.MoveNext
    Next I
    .AllowDynamicRo tation = True
    If RS.State Then RS.Close

    End With

    Comment

    Working...