latihan 42
Public Class latihan42_36109017Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\DATA GRAFIK.accdb;jet OLEDB:database password=apa")
Dim DT As New DataTable
Private Sub latihan42_36109017_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim uphy As New OleDb.OleDbDataAdapter
uphy = New OleDb.OleDbDataAdapter("select * from qrekapperrekening", CONECT)
DT.Rows.Clear()
uphy.Fill(DT)
dgv_36109017.DataSource = DT
uphy.Dispose()
chart_36109017.ColumnCount = 2
chart_36109017.RowCount = DT.Rows.Count
Dim POSISIBARIS As Integer = 0
For Each x As DataRow In DT.Rows
POSISIBARIS = POSISIBARIS + 1
chart_36109017.Row = POSISIBARIS
chart_36109017.RowLabel = x("koderekening")
chart_36109017.Column = 1
chart_36109017.Data = x("total debet") / 1000
chart_36109017.Column = 2
chart_36109017.Data = x("total kredit") / 1000
Next
End Sub
End Class

0 komentar:
Posting Komentar