Jumat, 18 November 2011

Latihan 44 APKOM 4 D3B

46 komentar:

  1. Public Class LATIHAN_044043
    Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\DATA GRAFIK.accdb;jet OLEDB:database password=280765")
    Dim DT As New DataTable
    Private Sub LATIHAN_044043_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    Dim nisa As New OleDb.OleDbDataAdapter
    nisa = New OleDb.OleDbDataAdapter("select * from QPembelianperbulanan", CONECT)
    DT.Rows.Clear()
    nisa.Fill(DT)
    DataGridView1.DataSource = DT
    nisa.Dispose()

    BalasHapus
  2. 'lanjutan
    GRAFIK.ColumnCount = 3
    GRAFIK.RowCount = DT.Rows.Count
    Dim POSISIBARIS As Integer = 0
    For Each x As DataRow In DT.Rows
    POSISIBARIS = POSISIBARIS + 1
    GRAFIK.Row = POSISIBARIS
    GRAFIK.RowLabel = x("bulan")
    GRAFIK.Column = 1
    GRAFIK.Data = x("unit")
    GRAFIK.Column = 2
    GRAFIK.Data = x("rata-rata harga") / 100
    GRAFIK.Column = 3
    GRAFIK.Data = x("JUMLAH") / 1000
    Next
    End Sub

    BalasHapus
  3. 'lanjutan
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    GRAFIK.chartType = MSChart20Lib.VtChChartType.VtChChartType2dBar
    End Sub
    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
    GRAFIK.chartType = MSChart20Lib.VtChChartType.VtChChartType2dLine
    End Sub
    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
    GRAFIK.chartType = MSChart20Lib.VtChChartType.VtChChartType2dPie
    End Sub
    Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
    GRAFIK.chartType = MSChart20Lib.VtChChartType.VtChChartType3dBar
    End Sub
    Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
    GRAFIK.chartType = MSChart20Lib.VtChChartType.VtChChartType3dLine
    End Sub
    End Class

    BalasHapus
  4. Public Class Latih44_36109034
    'DEKLARASI CONECTION
    Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\DATA GRAFIK.accdb;jet OLEDB:database password=nhunoe")
    'deklarasi data tabel
    Dim DT As New DataTable
    Private Sub Latih44_36109034_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    'deklarasi adapter
    Dim nhunoe As New OleDb.OleDbDataAdapter
    nhunoe = New OleDb.OleDbDataAdapter("select * from qpembelianperbulanan", CONECT) 'mkemunculkan semua data dari tabel barang dlm acces
    DT.Rows.Clear() 'membersihkan data tabEL
    nhunoe.Fill(DT) 'mengisi database ke dlm data table
    DataGridView1.DataSource = DT 'memunculkan dlm datagridview

    nhunoe.Dispose() 'menghancurkan kendaraan (adapter) yg sdh dipake

    'menentkan jumlah baris
    grafik_36109034.ColumnCount = 3
    grafik_36109034.RowCount = DT.Rows.Count

    'menentukan posisi baris
    Dim POSISIBARIS As Integer = 0

    For Each x As DataRow In DT.Rows
    POSISIBARIS = POSISIBARIS + 1
    grafik_36109034.Row = POSISIBARIS

    'memberi nama pada baris grafik dgn nama pada kolom thun.
    grafik_36109034.RowLabel = x("bulan")

    grafik_36109034.Column = 1
    grafik_36109034.Data = x("unit")

    grafik_36109034.Column = 2
    grafik_36109034.Data = x("rata-rata harga") / 1000

    grafik_36109034.Column = 3
    grafik_36109034.Data = x("jumlah") / 10000
    Next
    End Sub

    BalasHapus
  5. 'LANJUTAN

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2_36109034.Click
    grafik_36109034.chartType = MSChart20Lib.VtChChartType.VtChChartType2dLine
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1_36109034.Click
    grafik_36109034.chartType = MSChart20Lib.VtChChartType.VtChChartType2dBar
    End Sub

    Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5_36109034.Click
    grafik_36109034.chartType = MSChart20Lib.VtChChartType.VtChChartType3dLine
    End Sub

    Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4_36109034.Click
    grafik_36109034.chartType = MSChart20Lib.VtChChartType.VtChChartType3dBar
    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3_36109034.Click
    grafik_36109034.chartType = MSChart20Lib.VtChChartType.VtChChartType2dPie
    End Sub
    End Class

    BalasHapus
  6. Public Class LATIHAN_044_36109033
    'DEKLARASI CONECTION
    Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\DATA GRAFIK.accdb;jet OLEDB:database password=tahir")
    'deklarasi data tabel
    Dim Data As New DataTable
    Private Sub LATIHAN_044_36109033_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    'deklarasi adapter
    Dim tiwi As New OleDb.OleDbDataAdapter
    tiwi = New OleDb.OleDbDataAdapter("select * from qpembelianperbulanan", CONECT) 'mkemunculkan semua data dari tabel barang dlm acces
    Data.Rows.Clear() 'membersihkan data tabEL
    tiwi.Fill(Data) 'mengisi database ke dlm data table
    DataGridView1.DataSource = Data 'memunculkan dlm datagridview

    tiwi.Dispose() 'menghancurkan kendaraan (adapter) yg sdh dipake

    'menentkan jumlah baris
    AxMSChart136109033.ColumnCount = 3
    AxMSChart136109033.RowCount = Data.Rows.Count

    'menentukan posisi baris
    Dim POSISIBARIS As Integer = 0

    For Each x As DataRow In Data.Rows
    POSISIBARIS = POSISIBARIS + 1
    AxMSChart136109033.Row = POSISIBARIS

    'memberi nama pada baris grafik dgn nama pada kolom thun.
    AxMSChart136109033.RowLabel = x("bulan")

    AxMSChart136109033.Column = 1
    AxMSChart136109033.Data = x("unit")

    AxMSChart136109033.Column = 2
    AxMSChart136109033.Data = x("rata-rata harga") / 1000

    AxMSChart136109033.Column = 3
    AxMSChart136109033.Data = x("jumlah") / 10000
    Next
    End Sub

    BalasHapus
  7. Private Sub Button136109033_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button136109033.Click
    AxMSChart136109033.chartType = MSChart20Lib.VtChChartType.VtChChartType2dBar
    End Sub

    Private Sub Button236109033_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button236109033.Click
    AxMSChart136109033.chartType = MSChart20Lib.VtChChartType.VtChChartType2dLine

    End Sub

    Private Sub Button336109033_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button336109033.Click
    AxMSChart136109033.chartType = MSChart20Lib.VtChChartType.VtChChartType2dPie
    End Sub

    Private Sub Button436109033_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button436109033.Click
    AxMSChart136109033.chartType = MSChart20Lib.VtChChartType.VtChChartType3dBar
    End Sub

    Private Sub Button536109033_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button536109033.Click
    AxMSChart136109033.chartType = MSChart20Lib.VtChChartType.VtChChartType3dLine
    End Sub
    End Class

    BalasHapus
  8. Public Class LATIHAN_044_36109049

    'DEKLARASI CONECTION
    Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\DATA GRAFIK.accdb;jet OLEDB:database password=wirda")
    'deklarasi data tabel
    Dim DT As New DataTable

    Private Sub LATIHAN_044_049_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    'deklarasi adapter
    Dim WIRDA As New OleDb.OleDbDataAdapter
    WIRDA = New OleDb.OleDbDataAdapter("select * from qpembelianperbulanan", CONECT) 'mkemunculkan semua data dari tabel barang dlm acces
    DT.Rows.Clear() 'membersihkan data tabEL
    WIRDA.Fill(DT) 'mengisi database ke dlm data table
    DGV_36109049.DataSource = DT 'memunculkan dlm datagridview

    WIRDA.Dispose() 'menghancurkan kendaraan (adapter) yg sdh dipake

    'menentkan jumlah baris
    GRAFIK_36109049.ColumnCount = 3
    GRAFIK_36109049.RowCount = DT.Rows.Count

    'menentukan posisi baris
    Dim POSISIBARIS As Integer = 0

    For Each x As DataRow In DT.Rows
    POSISIBARIS = POSISIBARIS + 1
    GRAFIK_36109049.Row = POSISIBARIS

    'memberi nama pada baris grafik dgn nama pada kolom thun.
    GRAFIK_36109049.RowLabel = x("bulan")

    GRAFIK_36109049.Column = 1
    GRAFIK_36109049.Data = x("unit")

    GRAFIK_36109049.Column = 2
    GRAFIK_36109049.Data = x("rata-rata harga") / 1000

    GRAFIK_36109049.Column = 3
    GRAFIK_36109049.Data = x("jumlah") / 10000

    Next


    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1_36109049.Click
    GRAFIK_36109049.chartType = MSChart20Lib.VtChChartType.VtChChartType2dLine
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2_36109049.Click
    GRAFIK_36109049.chartType = MSChart20Lib.VtChChartType.VtChChartType2dBar
    End Sub

    Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5_36109049.Click
    GRAFIK_36109049.chartType = MSChart20Lib.VtChChartType.VtChChartType3dLine
    End Sub

    Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4_36109049.Click
    GRAFIK_36109049.chartType = MSChart20Lib.VtChChartType.VtChChartType3dBar
    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3_36109049.Click
    GRAFIK_36109049.chartType = MSChart20Lib.VtChChartType.VtChChartType2dPie
    End Sub


    End Class

    BalasHapus
  9. Public Class Latihan_44_36109056
    'DEKLARASI CONECTION
    Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\DATA GRAFIK.accdb;jet OLEDB:database password=2422")
    'deklarasi data tabel
    Dim DT As New DataTable
    Private Sub Latihan_44_36109056_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    'deklarasi adapter
    Dim biya As New OleDb.OleDbDataAdapter
    biya = New OleDb.OleDbDataAdapter("select * from qpembelianperbulanan", CONECT) 'mkemunculkan semua data dari tabel barang dlm acces
    DT.Rows.Clear() 'membersihkan data tabEL
    biya.Fill(DT) 'mengisi database ke dlm data table
    DGV_36109056.DataSource = DT 'memunculkan dlm datagridview

    biya.Dispose() 'menghancurkan kendaraan (adapter) yg sdh dipake

    'menentkan jumlah baris
    Grafik_36109056.ColumnCount = 3
    Grafik_36109056.RowCount = DT.Rows.Count

    'menentukan posisi baris
    Dim POSISIBARIS As Integer = 0

    For Each x As DataRow In DT.Rows
    POSISIBARIS = POSISIBARIS + 1
    Grafik_36109056.Row = POSISIBARIS

    'memberi nama pada baris grafik dgn nama pada kolom thun.
    Grafik_36109056.RowLabel = x("bulan")

    Grafik_36109056.Column = 1
    Grafik_36109056.Data = x("unit")

    Grafik_36109056.Column = 2
    Grafik_36109056.Data = x("rata-rata harga") / 1000

    Grafik_36109056.Column = 3
    Grafik_36109056.Data = x("jumlah") / 10000

    Next


    End Sub

    Private Sub B1_36109056_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B1_36109056.Click
    Grafik_36109056.chartType = MSChart20Lib.VtChChartType.VtChChartType2dBar
    End Sub

    Private Sub B2_36109056_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B2_36109056.Click
    Grafik_36109056.chartType = MSChart20Lib.VtChChartType.VtChChartType2dLine
    End Sub

    Private Sub B3_36109056_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B3_36109056.Click
    Grafik_36109056.chartType = MSChart20Lib.VtChChartType.VtChChartType2dPie
    End Sub

    Private Sub B4_36109056_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B4_36109056.Click
    Grafik_36109056.chartType = MSChart20Lib.VtChChartType.VtChChartType3dBar
    End Sub

    Private Sub B5_36109056_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B5_36109056.Click
    Grafik_36109056.chartType = MSChart20Lib.VtChChartType.VtChChartType3dLine
    End Sub
    End Class

    BalasHapus
  10. Public Class latihan_44_36109039
    'DEKLARASI CONECTION
    Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\DATA GRAFIK.accdb;jet OLEDB:database password=1234")
    'deklarasi data tabel
    Dim DT As New DataTable

    Private Sub LATIHAN_041_012_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    'deklarasi adapter
    Dim ifa As New OleDb.OleDbDataAdapter
    ifa = New OleDb.OleDbDataAdapter("select * from qpembelianperbulanan", CONECT) 'mkemunculkan semua data dari tabel barang dlm acces
    DT.Rows.Clear() 'membersihkan data tabEL
    ifa.Fill(DT) 'mengisi database ke dlm data table
    DataGridView1.DataSource = DT 'memunculkan dlm datagridview

    ifa.Dispose() 'menghancurkan kendaraan (adapter) yg sdh dipake

    'menentkan jumlah baris
    grafik039.ColumnCount = 3
    grafik039.RowCount = DT.Rows.Count

    'menentukan posisi baris
    Dim POSISIBARIS As Integer = 0

    For Each x As DataRow In DT.Rows
    POSISIBARIS = POSISIBARIS + 1
    grafik039.Row = POSISIBARIS

    'memberi nama pada baris grafik dgn nama pada kolom thun.
    grafik039.RowLabel = x("bulan")

    grafik039.Column = 1
    grafik039.Data = x("unit")

    grafik039.Column = 2
    grafik039.Data = x("rata-rata harga") / 1000

    grafik039.Column = 3
    grafik039.Data = x("jumlah") / 10000

    Next


    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2039.Click
    grafik039.chartType = MSChart20Lib.VtChChartType.VtChChartType2dLine
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1039.Click
    grafik039.chartType = MSChart20Lib.VtChChartType.VtChChartType2dBar
    End Sub

    Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5039.Click
    grafik039.chartType = MSChart20Lib.VtChChartType.VtChChartType3dLine
    End Sub

    Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4039.Click
    grafik039.chartType = MSChart20Lib.VtChChartType.VtChChartType3dBar
    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3039.Click
    grafik039.chartType = MSChart20Lib.VtChChartType.VtChChartType2dPie
    End Sub
    End Class

    BalasHapus
  11. Public Class Form44041
    'DEKLARASI CONECTION
    Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\DATA GRAFIK.accdb")
    'deklarasi data tabel
    Dim DT As New DataTable

    Private Sub LATIHAN_041_012_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    'deklarasi adapter
    Dim nisa As New OleDb.OleDbDataAdapter
    nisa = New OleDb.OleDbDataAdapter("select * from qpembelianperbulanan", CONECT) 'mkemunculkan semua data dari tabel barang dlm acces
    DT.Rows.Clear() 'membersihkan data tabEL
    nisa.Fill(DT) 'mengisi database ke dlm data table
    DataGridView1.DataSource = DT 'memunculkan dlm datagridview

    nisa.Dispose() 'menghancurkan kendaraan (adapter) yg sdh dipake

    'menentkan jumlah baris
    grafik.ColumnCount = 3
    grafik.RowCount = DT.Rows.Count

    'menentukan posisi baris
    Dim POSISIBARIS As Integer = 0

    For Each x As DataRow In DT.Rows
    POSISIBARIS = POSISIBARIS + 1
    grafik.Row = POSISIBARIS

    'memberi nama pada baris grafik dgn nama pada kolom thun.
    grafik.RowLabel = x("bulan")

    grafik.Column = 1
    grafik.Data = x("unit")

    grafik.Column = 2
    grafik.Data = x("rata-rata harga") / 1000

    grafik.Column = 3
    grafik.Data = x("jumlah") / 10000

    Next


    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
    grafik.chartType = MSChart20Lib.VtChChartType.VtChChartType2dLine
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    grafik.chartType = MSChart20Lib.VtChChartType.VtChChartType2dBar
    End Sub

    Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
    grafik.chartType = MSChart20Lib.VtChChartType.VtChChartType3dLine
    End Sub

    Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
    grafik.chartType = MSChart20Lib.VtChChartType.VtChChartType3dBar
    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
    grafik.chartType = MSChart20Lib.VtChChartType.VtChChartType2dPie
    End Sub
    End Class

    BalasHapus
  12. Komentar ini telah dihapus oleh pengarang.

    BalasHapus
  13. Komentar ini telah dihapus oleh pengarang.

    BalasHapus
  14. Public Class Latih44
    'DEKLARASI CONECTION
    Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\DATA GRAFIK.accdb;jet OLEDB:database password=150991")
    'deklarasi data tabel
    Dim DT As New DataTable
    Private Sub Latih4436109040_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    'deklarasi adapter
    Dim mytha As New OleDb.OleDbDataAdapter
    mytha = New OleDb.OleDbDataAdapter("select * from qpembelianperbulanan", CONECT) 'mkemunculkan semua data dari tabel barang dlm acces
    DT.Rows.Clear() 'membersihkan data tabEL
    mytha.Fill(DT) 'mengisi database ke dlm data table
    DataGridView1.DataSource = DT 'memunculkan dlm datagridview

    mytha.Dispose() 'menghancurkan kendaraan (adapter) yg sdh dipake

    'menentkan jumlah baris
    grafik36109040.ColumnCount = 3
    grafik36109040.RowCount = DT.Rows.Count

    'menentukan posisi baris
    Dim POSISIBARIS As Integer = 0

    For Each x As DataRow In DT.Rows
    POSISIBARIS = POSISIBARIS + 1
    grafik36109040.Row = POSISIBARIS

    'memberi nama pada baris grafik dgn nama pada kolom thun.
    grafik36109040.RowLabel = x("bulan")

    grafik36109040.Column = 1
    grafik36109040.Data = x("unit")

    grafik36109040.Column = 2
    grafik36109040.Data = x("rata-rata harga") / 1000

    grafik36109040.Column = 3
    grafik36109040.Data = x("jumlah") / 10000
    Next
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button236109040.Click
    grafik36109040.chartType = MSChart20Lib.VtChChartType.VtChChartType2dLine
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1_36109034.Click
    grafik_36109034.chartType = MSChart20Lib.VtChChartType.VtChChartType2dBar
    End Sub

    Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5_36109034.Click
    grafik_36109034.chartType = MSChart20Lib.VtChChartType.VtChChartType3dLine
    End Sub

    Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button436109040.Click
    grafik36109040.chartType = MSChart20Lib.VtChChartType.VtChChartType3dBar
    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button336109040.Click
    grafik36109040.chartType = MSChart20Lib.VtChChartType.VtChChartType2dPie
    End Sub
    End Class

    BalasHapus
  15. Public Class Latihan_044_36109045
    Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\DATA GRAFIK.accdb;jet OLEDB:database password=florista")
    Dim DT As New DataTable
    Private Sub Latihan_044_36109045_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    Dim chaca As New OleDb.OleDbDataAdapter
    chaca = New OleDb.OleDbDataAdapter("select * from QPembelianperbulanan", CONECT)
    DT.Rows.Clear()
    chaca.Fill(DT)
    DataGridView1.DataSource = DT
    chaca.Dispose()
    GRAFIK.ColumnCount = 3
    GRAFIK.RowCount = DT.Rows.Count
    Dim POSISIBARIS As Integer = 0
    For Each x As DataRow In DT.Rows
    POSISIBARIS = POSISIBARIS + 1
    GRAFIK.Row = POSISIBARIS
    GRAFIK.RowLabel = x("bulan")
    GRAFIK.Column = 1
    GRAFIK.Data = x("unit")
    GRAFIK.Column = 2
    GRAFIK.Data = x("rata-rata harga") / 100
    GRAFIK.Column = 3
    GRAFIK.Data = x("JUMLAH") / 1000
    Next
    End Sub

    BalasHapus
  16. Public Class Latihan_4436109055
    'DEKLARASI CONECTION
    Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\DATA GRAFIK.accdb;jet OLEDB:database password=23")
    'deklarasi data tabel
    Dim DT As New DataTable
    Private Sub Latihan_4436109055_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    'deklarasi adapter
    Dim falah As New OleDb.OleDbDataAdapter
    falah = New OleDb.OleDbDataAdapter("select * from qpembelianperbulanan", CONECT) 'mkemunculkan semua data dari tabel barang dlm acces
    DT.Rows.Clear() 'membersihkan data tabEL
    falah.Fill(DT) 'mengisi database ke dlm data table
    DGV36109055.DataSource = DT 'memunculkan dlm datagridview

    falah.Dispose() 'menghancurkan kendaraan (adapter) yg sdh dipake

    'menentkan jumlah baris
    Grafik36109055.ColumnCount = 3
    Grafik36109055.RowCount = DT.Rows.Count

    'menentukan posisi baris
    Dim POSISIBARIS As Integer = 0

    For Each x As DataRow In DT.Rows
    POSISIBARIS = POSISIBARIS + 1
    Grafik36109055.Row = POSISIBARIS

    'memberi nama pada baris grafik dgn nama pada kolom thun.
    Grafik36109055.RowLabel = x("bulan")

    Grafik36109055.Column = 1
    Grafik36109055.Data = x("unit")

    Grafik36109055.Column = 2
    Grafik36109055.Data = x("rata-rata harga") / 1000

    Grafik36109055.Column = 3
    Grafik36109055.Data = x("jumlah") / 10000

    Next


    End Sub

    Private Sub B136109055_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B136109055.Click
    Grafik36109055.chartType = MSChart20Lib.VtChChartType.VtChChartType2dBar
    End Sub

    Private Sub B236109055_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B236109055.Click
    Grafik36109055.chartType = MSChart20Lib.VtChChartType.VtChChartType2dLine
    End Sub

    Private Sub B336109055_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B336109055.Click
    Grafik36109055.chartType = MSChart20Lib.VtChChartType.VtChChartType2dPie
    End Sub

    Private Sub B436109055_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B436109055.Click
    Grafik36109055.chartType = MSChart20Lib.VtChChartType.VtChChartType3dBar
    End Sub

    Private Sub B53610905_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B53610905.Click
    Grafik36109055.chartType = MSChart20Lib.VtChChartType.VtChChartType3dLine
    End Sub
    End Class

    BalasHapus
  17. Public Class Form4436109050
    Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\DATA GRAFIK.accdb;Jet OLEDB:Database Password=nideria")
    Dim data As New DataTable

    Private Sub Form4436109050_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    Dim adapt As New OleDb.OleDbDataAdapter
    adapt = New OleDb.OleDbDataAdapter("select * from QPembelianperbulanan", CONECT)
    data.Rows.Clear()
    adapt.Fill(data)
    DataGridView1.DataSource = data

    adapt.Dispose()

    graf()

    End Sub

    Private Sub graf()
    GRAFIK.ColumnCount = 3
    GRAFIK.RowCount = data.Rows.Count

    Dim BARIS As Integer = 0

    For Each x As DataRow In data.Rows
    BARIS = BARIS + 1
    GRAFIK.Row = BARIS

    GRAFIK.RowLabel = x("bulan")

    GRAFIK.Column = 1
    GRAFIK.Data = x("unit")


    GRAFIK.Column = 2
    GRAFIK.Data = x("rata-rata harga") / 100


    GRAFIK.Column = 3
    GRAFIK.Data = x("JUMLAH") / 1000
    Next
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    GRAFIK.chartType = MSChart20Lib.VtChChartType.VtChChartType2dBar
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
    GRAFIK.chartType = MSChart20Lib.VtChChartType.VtChChartType2dLine
    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
    GRAFIK.chartType = MSChart20Lib.VtChChartType.VtChChartType2dPie
    End Sub

    Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
    GRAFIK.chartType = MSChart20Lib.VtChChartType.VtChChartType3dBar
    End Sub

    Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
    GRAFIK.chartType = MSChart20Lib.VtChChartType.VtChChartType3dLine
    End Sub
    End Class

    BalasHapus
  18. Public Class LATIHAN_044_36109051

    'DEKLARASI CONECTION
    Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\DATA GRAFIK.accdb;jet OLEDB:database password=molnan")
    'deklarasi data tabel
    Dim DT As New DataTable

    Private Sub LATIHAN_044_051_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    'deklarasi adapter
    Dim MOLNAN As New OleDb.OleDbDataAdapter
    MOLNAN = New OleDb.OleDbDataAdapter("select * from qpembelianperbulanan", CONECT) 'mkemunculkan semua data dari tabel barang dlm acces
    DT.Rows.Clear() 'membersihkan data tabEL
    MOLNAN.Fill(DT) 'mengisi database ke dlm data table
    DGV_Public Class LATIHAN_043_36109051

    'DEKLARASI CONECTION
    Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\DATA GRAFIK.accdb;jet OLEDB:database password=molnan")
    'deklarasi data tabel
    Dim DT As New DataTable

    Private Sub LATIHAN_041_051_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    'deklarasi adapter
    Dim MOLNAN As New OleDb.OleDbDataAdapter
    MOLNAN = New OleDb.OleDbDataAdapter("select * from qpembelianperjenisbarang", CONECT) 'mkemunculkan semua data dari tabel barang dlm acces
    DT.Rows.Clear() 'membersihkan data tabEL
    MOLNAN.Fill(DT) 'mengisi database ke dlm data table
    DGV_36109051.DataSource = DT 'memunculkan dlm datagridview

    MOLNAN.Dispose() 'menghancurkan kendaraan (adapter) yg sdh dipake

    'menentukan jumlah baris
    GRAFIK_36109051.ColumnCount = 3
    GRAFIK_36109051.RowCount = DT.Rows.Count

    'menentukan posisi baris
    Dim POSISIBARIS As Integer = 0

    For Each x As DataRow In DT.Rows
    POSISIBARIS = POSISIBARIS + 1
    GRAFIK_36109051.Row = POSISIBARIS

    'memberi nama pada baris grafik dgn nama pada kolom thun.
    GRAFIK_36109051.RowLabel = x("kode barang")

    GRAFIK_36109051.Column = 1
    GRAFIK_36109051.Data = x("unit")

    GRAFIK_36109051.Column = 2
    GRAFIK_36109051.Data = x("rata-rata harga") / 1000

    GRAFIK_36109051.Column = 3
    GRAFIK_36109051.Data = x("jumlah") / 10000

    Next

    End Sub

    BalasHapus
  19. End Sub

    End Class.DataSource = DT 'memunculkan dlm datagridview

    MOLNAN.Dispose() 'menghancurkan kendaraan (adapter) yg sdh dipake

    'menentkan jumlah baris
    GRAFIK_36109051.ColumnCount = 3
    GRAFIK_36109051.RowCount = DT.Rows.Count

    'menentukan posisi baris
    Dim POSISIBARIS As Integer = 0

    For Each x As DataRow In DT.Rows
    POSISIBARIS = POSISIBARIS + 1
    GRAFIK_36109051.Row = POSISIBARIS

    'memberi nama pada baris grafik dgn nama pada kolom thun.
    GRAFIK_36109051.RowLabel = x("bulan")

    GRAFIK_36109051.Column = 1
    GRAFIK_36109051.Data = x("unit")

    GRAFIK_36109051.Column = 2
    GRAFIK_36109051.Data = x("rata-rata harga") / 1000

    GRAFIK_36109051.Column = 3
    GRAFIK_36109051.Data = x("jumlah") / 10000

    Next


    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1_36109051.Click
    GRAFIK_36109051.chartType = MSChart20Lib.VtChChartType.VtChChartType2dLine
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2_36109051.Click
    GRAFIK_36109051.chartType = MSChart20Lib.VtChChartType.VtChChartType2dBar
    End Sub

    Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5_36109051.Click
    GRAFIK_36109051.chartType = MSChart20Lib.VtChChartType.VtChChartType3dLine
    End Sub

    Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4_36109051.Click
    GRAFIK_36109051.chartType = MSChart20Lib.VtChChartType.VtChChartType3dBar
    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3_36109051.Click
    GRAFIK_36109051.chartType = MSChart20Lib.VtChChartType.VtChChartType2dPie
    End Sub


    End Class

    BalasHapus
  20. Public Class Latihan4436109038
    Dim hma As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; DATA SOURCE =" & Application.StartupPath & "/DATA GRAFIK.ACCDB")
    Dim dt As New DataTable

    Private Sub Latihan4436109038_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    Dim a As New OleDb.OleDbDataAdapter
    a = New OleDb.OleDbDataAdapter("select * from qpembelianperbulanan", hma)
    dt.Rows.Clear()
    a.Fill(dt)
    a.Dispose()

    dgv.DataSource = dt

    icha.ColumnCount = 3
    icha.RowCount = dt.Rows.Count

    Dim azizah As Integer = 0
    For Each x As DataRow In dt.Rows
    azizah += 1

    icha.Row = azizah
    icha.RowLabel = x("bulan")

    icha.Column = 1
    icha.Data = x("unit")

    icha.Column = 2
    icha.Data = x("rata-rata harga") / 1000

    icha.Column = 3
    icha.Data = x("jumlah") / 10000
    Next
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    icha.chartType = MSChart20Lib.VtChChartType.VtChChartType2dBar
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
    icha.chartType = MSChart20Lib.VtChChartType.VtChChartType2dLine
    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
    icha.chartType = MSChart20Lib.VtChChartType.VtChChartType2dPie
    End Sub

    Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
    icha.chartType = MSChart20Lib.VtChChartType.VtChChartType3dBar
    End Sub

    Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
    icha.chartType = MSChart20Lib.VtChChartType.VtChChartType3dLine
    End Sub
    End Class

    BalasHapus
  21. Public Class latihan_44_36109035
    'DEKLARASI CONECTION
    Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\DATA GRAFIK.accdb;jet OLEDB:database password=andihabibi27")
    'deklarasi data tabel
    Dim DT As New DataTable

    Private Sub LATIHAN_041_012_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    'deklarasi adapter
    Dim bibi As New OleDb.OleDbDataAdapter
    bibi = New OleDb.OleDbDataAdapter("select * from qpembelianperbulanan", CONECT) 'mkemunculkan semua data dari tabel barang dlm acces
    DT.Rows.Clear() 'membersihkan data tabEL
    bibi.Fill(DT) 'mengisi database ke dlm data table
    DataGridView1.DataSource = DT 'memunculkan dlm datagridview

    bibi.Dispose() 'menghancurkan kendaraan (adapter) yg sdh dipake

    'menentkan jumlah baris
    grafik035.ColumnCount = 3
    grafik035.RowCount = DT.Rows.Count

    'menentukan posisi baris
    Dim POSISIBARIS As Integer = 0

    For Each x As DataRow In DT.Rows
    POSISIBARIS = POSISIBARIS + 1
    grafik035.Row = POSISIBARIS

    'memberi nama pada baris grafik dgn nama pada kolom thun.
    grafik035.RowLabel = x("bulan")

    grafik035.Column = 1
    grafik035.Data = x("unit")

    grafik035.Column = 2
    grafik035.Data = x("rata-rata harga") / 1000

    grafik035.Column = 3
    grafik035.Data = x("jumlah") / 10000

    Next


    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2035.Click
    grafik035.chartType = MSChart20Lib.VtChChartType.VtChChartType2dLine
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1035.Click
    grafik035.chartType = MSChart20Lib.VtChChartType.VtChChartType2dBar
    End Sub

    Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5035.Click
    grafik035.chartType = MSChart20Lib.VtChChartType.VtChChartType3dLine
    End Sub

    Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4035.Click
    grafik035.chartType = MSChart20Lib.VtChChartType.VtChChartType3dBar
    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3035.Click
    grafik035.chartType = MSChart20Lib.VtChChartType.VtChChartType2dPie
    End Sub
    End Class

    BalasHapus
  22. Public Class Lat4436109042
    'DEKLARASI CONECTION
    Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\DATA GRAFIK.accdb")
    'deklarasi data tabel
    Dim IJAL As New DataTable

    Private Sub Lat4436109042_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    'deklarasi adapter
    Dim jal As New OleDb.OleDbDataAdapter
    jal = New OleDb.OleDbDataAdapter("select * from QPembelianperbulanan", CONECT) 'mkemunculkan semua data dari tabel barang dlm acces
    IJAL.Rows.Clear() 'membersihkan data tabEL
    jal.Fill(IJAL) 'mengisi database ke dlm data table
    DataGridView1.DataSource = IJAL 'memunculkan dlm datagridview

    jal.Dispose() 'menghancurkan kendaraan (adapter) yg sdh dipake

    rezpect()

    End Sub

    Private Sub rezpect()
    'menentkan jumlah baris
    GRAFIK.ColumnCount = 3
    GRAFIK.RowCount = IJAL.Rows.Count

    'menentukan posisi baris
    Dim POSISIBARIS As Integer = 0

    For Each x As DataRow In IJAL.Rows
    POSISIBARIS = POSISIBARIS + 1
    GRAFIK.Row = POSISIBARIS

    GRAFIK.RowLabel = x("bulan")

    GRAFIK.Column = 1
    GRAFIK.Data = x("unit")


    GRAFIK.Column = 2
    GRAFIK.Data = x("rata-rata harga") / 100


    GRAFIK.Column = 3
    GRAFIK.Data = x("JUMLAH") / 1000

    Next

    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

    GRAFIK.chartType = MSChart20Lib.VtChChartType.VtChChartType2dBar

    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click

    GRAFIK.chartType = MSChart20Lib.VtChChartType.VtChChartType2dLine
    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click

    GRAFIK.chartType = MSChart20Lib.VtChChartType.VtChChartType2dPie
    End Sub

    Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click

    GRAFIK.chartType = MSChart20Lib.VtChChartType.VtChChartType3dBar

    End Sub

    Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click

    GRAFIK.chartType = MSChart20Lib.VtChChartType.VtChChartType3dLine

    End Sub
    End Class

    BalasHapus
  23. Public Class Form4436108001
    Dim INCE As New OleDb.OleDbConnection("provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\Data Grafik.accdb")
    Dim LV As New DataTable
    Private Sub Form4436108001_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    Dim CE As New OleDb.OleDbDataAdapter
    CE = New OleDb.OleDbDataAdapter("select * from QPembelianperbulanan", INCE)
    LV.Rows.Clear()
    CE.Fill(LV)
    DGV36108001.DataSource = LV
    CE.Dispose()
    RIA()
    End Sub
    Private Sub RIA()
    GRAFIK36108001.ColumnCount = 3
    GRAFIK36108001.RowCount = LV.Rows.Count

    Dim p As Integer = 0
    For Each x As DataRow In LV.Rows
    p = p + 1
    GRAFIK36108001.Row = p
    GRAFIK36108001.RowLabel = x("Bulan")

    GRAFIK36108001.Column = 1
    GRAFIK36108001.Data = x("Unit")

    GRAFIK36108001.Column = 2
    GRAFIK36108001.Data = x("Rata-Rata Harga") / 100

    GRAFIK36108001.Column = 3
    GRAFIK36108001.Data = x("Jumlah") / 1000
    Next
    End Sub
    Private Sub B136108001_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B136108001.Click
    GRAFIK36108001.chartType = MSChart20Lib.VtChChartType.VtChChartType2dBar
    End Sub
    Private Sub B236108001_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B236108001.Click
    GRAFIK36108001.chartType = MSChart20Lib.VtChChartType.VtChChartType2dPie
    End Sub
    Private Sub B336108001_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B336108001.Click
    GRAFIK36108001.chartType = MSChart20Lib.VtChChartType.VtChChartType2dLine
    End Sub
    Private Sub B436108001_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B436108001.Click
    GRAFIK36108001.chartType = MSChart20Lib.VtChChartType.VtChChartType3dBar
    End Sub
    Private Sub B536108001_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B536108001.Click
    GRAFIK36108001.chartType = MSChart20Lib.VtChChartType.VtChChartType3dLine
    End Sub
    End Class

    BalasHapus
  24. Public Class Grafik44_34109037
    Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\DATA GRAFIK.accdb;Jet OLEDB:Database Password=2901911691")
    Dim data As New DataTable

    Private Sub Form4436109050_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    Dim adapt As New OleDb.OleDbDataAdapter
    adapt = New OleDb.OleDbDataAdapter("select * from QPembelianperbulanan", CONECT) 'mkemunculkan semua data dari tabel barang dlm acces
    data.Rows.Clear()
    adapt.Fill(data)
    DataGridView1.DataSource = data

    adapt.Dispose()

    graf()

    End Sub

    Private Sub graf()
    GRAFIK.ColumnCount = 3
    GRAFIK.RowCount = data.Rows.Count

    Dim BARIS As Integer = 0

    For Each x As DataRow In data.Rows
    BARIS = BARIS + 1
    GRAFIK.Row = BARIS

    GRAFIK.RowLabel = x("bulan")

    GRAFIK.Column = 1
    GRAFIK.Data = x("unit")


    GRAFIK.Column = 2
    GRAFIK.Data = x("rata-rata harga") / 100


    GRAFIK.Column = 3
    GRAFIK.Data = x("JUMLAH") / 1000
    Next
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    GRAFIK.chartType = MSChart20Lib.VtChChartType.VtChChartType2dBar
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
    GRAFIK.chartType = MSChart20Lib.VtChChartType.VtChChartType2dLine
    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
    GRAFIK.chartType = MSChart20Lib.VtChChartType.VtChChartType2dPie
    End Sub

    Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
    GRAFIK.chartType = MSChart20Lib.VtChChartType.VtChChartType3dBar
    End Sub

    Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
    GRAFIK.chartType = MSChart20Lib.VtChChartType.VtChChartType3dLine
    End Sub
    End Class

    BalasHapus
  25. Public Class LATIHAN_04436109029


    Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\DATA GRAFIK.accdb;Jet OLEDB:Database Password=hapsari")
    Dim data As New DataTable

    Private Sub LATIHAN_04436109029_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    Dim adapt As New OleDb.OleDbDataAdapter
    adapt = New OleDb.OleDbDataAdapter("select * from QPembelianperbulanan", CONECT)
    data.Rows.Clear()
    adapt.Fill(data)
    DataGridView1.DataSource = data

    adapt.Dispose()

    graf()

    End Sub

    Private Sub graf()
    GRAFIK.ColumnCount = 3
    GRAFIK.RowCount = data.Rows.Count

    Dim BARIS As Integer = 0

    For Each x As DataRow In data.Rows
    BARIS = BARIS + 1
    GRAFIK.Row = BARIS

    GRAFIK.RowLabel = x("bulan")

    GRAFIK.Column = 1
    GRAFIK.Data = x("unit")


    GRAFIK.Column = 2
    GRAFIK.Data = x("rata-rata harga") / 100


    GRAFIK.Column = 3
    GRAFIK.Data = x("JUMLAH") / 1000
    Next
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
    GRAFIK.chartType = MSChart20Lib.VtChChartType.VtChChartType2dBar
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
    GRAFIK.chartType = MSChart20Lib.VtChChartType.VtChChartType2dLine
    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
    GRAFIK.chartType = MSChart20Lib.VtChChartType.VtChChartType2dPie
    End Sub

    Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
    GRAFIK.chartType = MSChart20Lib.VtChChartType.VtChChartType3dBar
    End Sub

    Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
    GRAFIK.chartType = MSChart20Lib.VtChChartType.VtChChartType3dLine
    End Sub
    End Class

    BalasHapus
  26. lanjutan
    GRAFIK.ColumnCount = 3
    GRAFIK.RowCount = DT.Rows.Count
    Dim POSISIBARIS As Integer = 0
    For Each x As DataRow In DT.Rows
    POSISIBARIS = POSISIBARIS + 1
    GRAFIK.Row = POSISIBARIS
    GRAFIK.RowLabel = x("bulan")
    GRAFIK.Column = 1
    GRAFIK.Data = x("unit")
    GRAFIK.Column = 2
    GRAFIK.Data = x("rata-rata harga") / 100
    GRAFIK.Column = 3
    GRAFIK.Data = x("JUMLAH") / 1000
    Next
    End Sub

    BalasHapus
  27. 'lanjutan
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    GRAFIK.chartType = MSChart20Lib.VtChChartType.VtChChartType2dBar
    End Sub
    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
    GRAFIK.chartType = MSChart20Lib.VtChChartType.VtChChartType2dLine
    End Sub
    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
    GRAFIK.chartType = MSChart20Lib.VtChChartType.VtChChartType2dPie
    End Sub
    Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
    GRAFIK.chartType = MSChart20Lib.VtChChartType.VtChChartType3dBar
    End Sub
    Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
    GRAFIK.chartType = MSChart20Lib.VtChChartType.VtChChartType3dLine
    End Sub
    End Class

    BalasHapus
  28. http://reskypurwono.blogspot.com/2012/10/prosedur-penyelesaian-latihan4436110037.html

    BalasHapus
  29. http://rainaagrippinaa.blogspot.com/2012/10/latihan4436110032.html

    BalasHapus
  30. http://nurrahmahrasyid2.blogspot.com/2012/10/latihan4436110042.html

    BalasHapus
  31. http://ias-anakbola.blogspot.com/2012/11/latihan4436110056.html

    BalasHapus
  32. http://eminaomi.blogspot.com/2012/11/latihan4436110049.html

    BalasHapus
  33. http://benhilll.blogspot.com/2012/11/deskripsi-dan-prosedur-latihan4436110039.html

    BalasHapus
  34. http://ruslancullank1.blogspot.com/2012/11/deskripsilatihan4436110054.html

    BalasHapus
  35. http://rosyanausman.blogspot.com/2012/11/latihan4436110036.html

    BalasHapus
  36. http://hilariusmariotonapa.blogspot.com/2012/11/deskripsi-latihan4436110048.html
    http://hilariusmariotonapa.blogspot.com/2012/11/prosedur-penyelesaian-latihan4436110048.html

    BalasHapus
  37. http://ilhaazzahra.blogspot.com/2012/11/latihan4436110033.html

    BalasHapus
  38. http://audryasharii.blogspot.com/2012/10/latihan4436110031.html

    BalasHapus
  39. http://tiya-sri.blogspot.com/2012/11/latihan4436110044-aplikasi-komputer-4.html

    BalasHapus
  40. http://dewiwahyuni91.blogspot.com/2012/11/latihan4436110038.html

    BalasHapus
  41. http://burhankhang58.blogspot.com/2012/11/latihan4436110047.html

    BalasHapus
  42. http://rizka-azisah.blogspot.com/2012/11/deskripsi-penyelesaian-latihan4436110041.html

    BalasHapus
  43. http://rahmisuryatama05.blogspot.com/2012/11/latihan4436110040.html

    BalasHapus
  44. http://sukadriady.blogspot.com/2013/01/latihan4436110043.html

    BalasHapus
  45. http://hasfiahzain.blogspot.com/2013/01/latihan4436110052.html

    BalasHapus
  46. http://zulkiflitryputra.blogspot.com/2013/01/latihan4436110046_31.html

    BalasHapus