Public Class latihan_41_36109058 Dim yunha As New OleDb.OleDbConnection("Provider=microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\Data Grafik.accdb") Dim dt As New DataTable Private Sub latihan_41_36109058_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim yh As New OleDb.OleDbDataAdapter yh = New OleDb.OleDbDataAdapter("Select * From Keuangan", yunha) yh.Fill(dt) yh.Dispose() dgv1.DataSource = dt
Dim pute As New DataTable Dim AB As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\Data Grafik.accdb")
Private Sub LATIHAN_041_36109075_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim mobil As New OleDb.OleDbDataAdapter mobil = New OleDb.OleDbDataAdapter("select* from keuangan", AB) mobil.Fill(pute) pute075.DataSource = pute mobil.Dispose()
'membuat jumlah baris dan jumlah kolom grafik yang akan dibuat puput075.RowCount = pute.Rows.Count() puput075.ColumnCount = 2
'memasukkan data ke setiap baris dan setiap kolom dari Data Tabel dtkeuangan Dim LORENZO As Integer = 0
For Each BarisX As DataRow In pute.Rows LORENZO = LORENZO + 1
puput075.Row = LORENZO puput075.RowLabel = BarisX("TAHUN")
Public Class Latihan41_059 Dim k As New OleDb.OleDbConnection("Provider=microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\Data Grafik.accdb") Dim dt As New DataTable Private Sub Latihan41_059_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim X As New OleDb.OleDbDataAdapter X = New OleDb.OleDbDataAdapter("Select * From Keuangan", k) X.Fill(dt) X.Dispose() cika059.DataSource = dt
Dim A As New OleDb.OleDbConnection("Provider=microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\Data Grafik.accdb") Dim dt As New DataTable
Private Sub Form41068_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim X As New OleDb.OleDbDataAdapter X = New OleDb.OleDbDataAdapter("Select * From Keuangan", A) X.Fill(dt) X.Dispose() dgv068.DataSource = dt
Public Class latihan4136109061 Dim mjl As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; DATA SOURCE =" & Application.StartupPath & "/Data Grafik.accdb") Dim dt As New DataTable
Private Sub latihan4136109061_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim L As New OleDb.OleDbDataAdapter L = New OleDb.OleDbDataAdapter("select * from keuangan", mjl) dt.Rows.Clear() L.Fill(dt) L.Dispose()
Public Class Form4136109084 Dim dfa As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; DATA SOURCE =" & Application.StartupPath & "/Data Grafik.accdb") Dim fd As New DataTable Private Sub Form4136109084_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim F As New OleDb.OleDbDataAdapter F = New OleDb.OleDbDataAdapter("select * from keuangan", dfa) fd.Rows.Clear() F.Fill(fd) F.Dispose()
Public Class LATIHAN04136109060 Dim SN As New OleDb.OleDbConnection("Provider=microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\Data Grafik.accdb") Dim dt As New DataTable
Private Sub Latihan41017_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim N As New OleDb.OleDbDataAdapter N = New OleDb.OleDbDataAdapter("Select * From Keuangan", SN) N.Fill(dt) N.Dispose() DGV060.DataSource = dt
Dim krisna As New OleDb.OleDbConnection("Provider=microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\Data Grafik.accdb") Dim ks As New DataTable
Private Sub latihan_41_36109074_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim K As New OleDb.OleDbDataAdapter K = New OleDb.OleDbDataAdapter("Select * From Keuangan", krisna) ks.Rows.Clear() K.Fill(ks) K.Dispose() dgv_074.DataSource = ks
Public Class Latihan_41_09079 Dim cate As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; DATA SOURCE =" & Application.StartupPath & "/Data Grafik.accdb") Dim dt As New DataTable
Private Sub Latihan_41_09079_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 keuangan", cate) dt.Rows.Clear() a.Fill(dt) a.Dispose()
Public Class Latihan41_36109073 Dim AA As New OleDb.OleDbConnection("Provider=microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\Data Grafik.accdb") Dim dt As New DataTable
Private Sub Latihan41_36109073_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim Y As New OleDb.OleDbDataAdapter Y = New OleDb.OleDbDataAdapter("Select * From Keuangan", AA) Y.Fill(dt) Y.Dispose() DGV073.DataSource = dt
Public Class Form4136109062 Dim KJS As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; DATA SOURCE =" & Application.StartupPath & "/Data Grafik.ACCDB") Dim dt As New DataTable
Private Sub dgv062_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles dgv062.CellContentClick
End Sub
Private Sub Form4136109062_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim b As New OleDb.OleDbDataAdapter b = New OleDb.OleDbDataAdapter("select * from Keuangan", KJS) dt.Rows.Clear() b.Fill(dt) b.Dispose()
Dim fatma As New DataTable Dim AB As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\Data Grafik.accdb")
Private Sub Form41_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim oto As New OleDb.OleDbDataAdapter oto = New OleDb.OleDbDataAdapter("select* from keuangan", AB) oto.Fill(fatma) DataGridView057.DataSource = fatma oto.Dispose()
'membuat jumlah baris dan jumlah kolom grafik yang akan dibuat grafik057.RowCount = fatma.Rows.Count() grafik057.ColumnCount = 2
'memasukkan data ke setiap baris dan setiap kolom dari Data Tabel dtkeuangan Dim bone As Integer = 0
For Each BarisX As DataRow In fatma.Rows bone = bone + 1
grafik057.Row = bone grafik057.RowLabel = BarisX("TAHUN")
Public Class Latihan_41_09081 Dim ian As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; DATA SOURCE =" & Application.StartupPath & "/Data Grafik.accdb") Dim dt As New DataTable
Private Sub Latihan_41_09081_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 keuangan", ian) dt.Rows.Clear() a.Fill(dt) a.Dispose()
Dim nurul As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; DATA SOURCE =" & Application.StartupPath & "/Data Grafik.accdb") Dim dt As New DataTable
Private Sub latihan41_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 keuangan", nurul) dt.Rows.Clear() a.Fill(dt) a.Dispose()
Dim v As New OleDb.OleDbConnection("Provider=microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\Data Grafik.accdb") Dim dt As New DataTable
Private Sub tugas41_36109067_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim X As New OleDb.OleDbDataAdapter X = New OleDb.OleDbDataAdapter("Select * From Keuangan", v) X.Fill(dt) X.Dispose() dgv067.DataSource = dt
Public Class latihan_41_36109058
BalasHapusDim yunha As New OleDb.OleDbConnection("Provider=microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\Data Grafik.accdb")
Dim dt As New DataTable
Private Sub latihan_41_36109058_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim yh As New OleDb.OleDbDataAdapter
yh = New OleDb.OleDbDataAdapter("Select * From Keuangan", yunha)
yh.Fill(dt)
yh.Dispose()
dgv1.DataSource = dt
'Membuat grafik'
AxMSChart1.ColumnCount = 2
AxMSChart1.RowCount = dt.Rows.Count
'Membuat tabel dalam grafik'
Dim yi As Integer = 0
For Each dn As DataRow In dt.Rows
yi = yi + 1
AxMSChart1.Row = yi
AxMSChart1.RowLabel = dn("TAHUN")
AxMSChart1.Column = 1
AxMSChart1.Data = dn("PENDAPATAN") / 1000
AxMSChart1.Column = 2
AxMSChart1.Data = dn("BIAYA") / 1000
Next
End Sub
End Class
Putry Alfatih (361 09 075)
BalasHapusPublic Class LATIHAN_041_36109075
Dim pute As New DataTable
Dim AB As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\Data Grafik.accdb")
Private Sub LATIHAN_041_36109075_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim mobil As New OleDb.OleDbDataAdapter
mobil = New OleDb.OleDbDataAdapter("select* from keuangan", AB)
mobil.Fill(pute)
pute075.DataSource = pute
mobil.Dispose()
'membuat jumlah baris dan jumlah kolom grafik yang akan dibuat
puput075.RowCount = pute.Rows.Count()
puput075.ColumnCount = 2
'memasukkan data ke setiap baris dan setiap kolom dari Data Tabel dtkeuangan
Dim LORENZO As Integer = 0
For Each BarisX As DataRow In pute.Rows
LORENZO = LORENZO + 1
puput075.Row = LORENZO
puput075.RowLabel = BarisX("TAHUN")
puput075.Column = 1
puput075.Data = BarisX("PENDAPATAN") / 1000
puput075.Column = 2
puput075.Data = BarisX("BIAYA") / 1000
Next
End Sub
End Class
Public Class Latihan41_059
BalasHapusDim k As New OleDb.OleDbConnection("Provider=microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\Data Grafik.accdb")
Dim dt As New DataTable
Private Sub Latihan41_059_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim X As New OleDb.OleDbDataAdapter
X = New OleDb.OleDbDataAdapter("Select * From Keuangan", k)
X.Fill(dt)
X.Dispose()
cika059.DataSource = dt
'Membuat grafik'
Chart.ColumnCount = 2
Chart.RowCount = dt.Rows.Count
'Membuat tabel dalam grafik'
Dim PB As Integer = 0
For Each cika As DataRow In dt.Rows
PB = PB + 1
chart.Row = PB
chart.RowLabel = cika("TAHUN")
chart.Column = 1
chart.Data = cika("PENDAPATAN") / 1000
chart.Column = 2
chart.Data = cika("BIAYA") / 1000
Next
End Sub
End Class
Public Class Form41068
BalasHapusDim A As New OleDb.OleDbConnection("Provider=microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\Data Grafik.accdb")
Dim dt As New DataTable
Private Sub Form41068_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim X As New OleDb.OleDbDataAdapter
X = New OleDb.OleDbDataAdapter("Select * From Keuangan", A)
X.Fill(dt)
X.Dispose()
dgv068.DataSource = dt
'Membuat grafik'
chart068.ColumnCount = 2
chart068.RowCount = dt.Rows.Count
'Membuat tabel dalam grafik'
Dim PB As Integer = 0
For Each ina As DataRow In dt.Rows
PB = PB + 1
chart068.Row = PB
chart068.RowLabel = ina("TAHUN")
chart068.Column = 1
chart068.Data = ina("PENDAPATAN") / 1000
chart068.Column = 2
chart068.Data = ina("BIAYA") / 1000
Next
End Sub
End Class
Public Class latihan4136109061
BalasHapusDim mjl As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; DATA SOURCE =" & Application.StartupPath & "/Data Grafik.accdb")
Dim dt As New DataTable
Private Sub latihan4136109061_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim L As New OleDb.OleDbDataAdapter
L = New OleDb.OleDbDataAdapter("select * from keuangan", mjl)
dt.Rows.Clear()
L.Fill(dt)
L.Dispose()
dgvku.DataSource = dt
lilis.ColumnCount = 2
lilis.RowCount = dt.Rows.Count
Dim lili As Integer = 0
For Each x As DataRow In dt.Rows
lili += 1
lilis.Row = lili
lilis.RowLabel = x("tahun")
lilis.Column = 1
lilis.Data = x("pendapatan") / 1000
lilis.Column = 2
lilis.Data = x("biaya") / 1000
Next
End Sub
End Class
Public Class Form4136109084
BalasHapusDim dfa As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; DATA SOURCE =" & Application.StartupPath & "/Data Grafik.accdb")
Dim fd As New DataTable
Private Sub Form4136109084_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim F As New OleDb.OleDbDataAdapter
F = New OleDb.OleDbDataAdapter("select * from keuangan", dfa)
fd.Rows.Clear()
F.Fill(fd)
F.Dispose()
dgv_084.DataSource = fd
chart_084.ColumnCount = 2
chart_084.RowCount = fd.Rows.Count
Dim fitrah As Integer = 0
For Each x As DataRow In fd.Rows
fitrah += 1
chart_084.Row = fitrah
chart_084.RowLabel = x("tahun")
chart_084.Column = 1
chart_084.Data = x("pendapatan") / 1000
chart_084.Column = 2
chart_084.Data = x("biaya") / 1000
Next
End Sub
End Class
Public Class LATIHAN04136109060
BalasHapusDim SN As New OleDb.OleDbConnection("Provider=microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\Data Grafik.accdb")
Dim dt As New DataTable
Private Sub Latihan41017_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim N As New OleDb.OleDbDataAdapter
N = New OleDb.OleDbDataAdapter("Select * From Keuangan", SN)
N.Fill(dt)
N.Dispose()
DGV060.DataSource = dt
'Membuat grafik'
grafik060.ColumnCount = 2
grafik060.RowCount = dt.Rows.Count
'Membuat tabel dalam grafik'
Dim PB As Integer = 0
For Each ina As DataRow In dt.Rows
PB = PB + 1
grafik060.Row = PB
grafik060.RowLabel = ina("TAHUN")
grafik060.Column = 1
grafik060.Data = ina("PENDAPATAN") / 1000
grafik060.Column = 2
grafik060.Data = ina("BIAYA") / 1000
Next
End Sub
End Class
Public Class latihan_41_36109074
BalasHapusDim krisna As New OleDb.OleDbConnection("Provider=microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\Data Grafik.accdb")
Dim ks As New DataTable
Private Sub latihan_41_36109074_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim K As New OleDb.OleDbDataAdapter
K = New OleDb.OleDbDataAdapter("Select * From Keuangan", krisna)
ks.Rows.Clear()
K.Fill(ks)
K.Dispose()
dgv_074.DataSource = ks
'Membuat grafik'
chart_074.ColumnCount = 2
chart_074.RowCount = ks.Rows.Count
'Membuat tabel dalam grafik'
Dim tati As Integer = 0
For Each ano As DataRow In ks.Rows
tati = tati + 1
chart_074.Row = tati
chart_074.RowLabel = ano("TAHUN")
chart_074.Column = 1
chart_074.Data = ano("PENDAPATAN") / 1000
chart_074.Column = 2
chart_074.Data = ano("BIAYA") / 1000
Next
End Sub
End Class
Public Class Latihan_41_09079
BalasHapusDim cate As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; DATA SOURCE =" & Application.StartupPath & "/Data Grafik.accdb")
Dim dt As New DataTable
Private Sub Latihan_41_09079_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 keuangan", cate)
dt.Rows.Clear()
a.Fill(dt)
a.Dispose()
dgv079.DataSource = dt
catherine.ColumnCount = 2
catherine.RowCount = dt.Rows.Count
Dim pkkp As Integer = 0
For Each x As DataRow In dt.Rows
pkkp += 1
catherine.Row = pkkp
catherine.RowLabel = x("tahun")
catherine.Column = 1
catherine.Data = x("pendapatan") / 1000
catherine.Column = 2
catherine.Data = x("biaya") / 1000
Next
End Sub
End Class
Public Class Latihan41_36109073
BalasHapusDim AA As New OleDb.OleDbConnection("Provider=microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\Data Grafik.accdb")
Dim dt As New DataTable
Private Sub Latihan41_36109073_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim Y As New OleDb.OleDbDataAdapter
Y = New OleDb.OleDbDataAdapter("Select * From Keuangan", AA)
Y.Fill(dt)
Y.Dispose()
DGV073.DataSource = dt
'Membuat grafik'
CHART073.ColumnCount = 2
CHART073.RowCount = dt.Rows.Count
'Membuat tabel dalam grafik'
Dim EK As Integer = 0
For Each EVI As DataRow In dt.Rows
EK = EK + 1
CHART073.Row = EK
CHART073.RowLabel = EVI("TAHUN")
CHART073.Column = 1
CHART073.Data = EVI("PENDAPATAN") / 1000
CHART073.Column = 2
CHART073.Data = EVI("BIAYA") / 1000
Next
End Sub
End Class
Public Class Form4136109062
BalasHapusDim KJS As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; DATA SOURCE =" & Application.StartupPath & "/Data Grafik.ACCDB")
Dim dt As New DataTable
Private Sub dgv062_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles dgv062.CellContentClick
End Sub
Private Sub Form4136109062_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim b As New OleDb.OleDbDataAdapter
b = New OleDb.OleDbDataAdapter("select * from Keuangan", KJS)
dt.Rows.Clear()
b.Fill(dt)
b.Dispose()
dgv062.DataSource = dt
urim.ColumnCount = 2
urim.RowCount = dt.Rows.Count
Dim fani As Integer = 0
For Each x As DataRow In dt.Rows
fani += 1
urim.Row = fani
urim.RowLabel = x("TAHUN")
urim.Column = 1
urim.Data = x("PENDAPATAN") / 1000
urim.Column = 2
urim.Data = x("BIAYA") / 1000
Next
End Sub
End Class
Public Class Form41
BalasHapusDim fatma As New DataTable
Dim AB As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\Data Grafik.accdb")
Private Sub Form41_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim oto As New OleDb.OleDbDataAdapter
oto = New OleDb.OleDbDataAdapter("select* from keuangan", AB)
oto.Fill(fatma)
DataGridView057.DataSource = fatma
oto.Dispose()
'membuat jumlah baris dan jumlah kolom grafik yang akan dibuat
grafik057.RowCount = fatma.Rows.Count()
grafik057.ColumnCount = 2
'memasukkan data ke setiap baris dan setiap kolom dari Data Tabel dtkeuangan
Dim bone As Integer = 0
For Each BarisX As DataRow In fatma.Rows
bone = bone + 1
grafik057.Row = bone
grafik057.RowLabel = BarisX("TAHUN")
grafik057.Column = 1
grafik057.Data = BarisX("PENDAPATAN") / 1000
grafik057.Column = 2
grafik057.Data = BarisX("BIAYA") / 1000
Next
End Sub
End Class
Public Class Latihan_41_09081
BalasHapusDim ian As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; DATA SOURCE =" & Application.StartupPath & "/Data Grafik.accdb")
Dim dt As New DataTable
Private Sub Latihan_41_09081_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 keuangan", ian)
dt.Rows.Clear()
a.Fill(dt)
a.Dispose()
dgv09081.DataSource = dt
yusri081.ColumnCount = 2
yusri081.RowCount = dt.Rows.Count
Dim yusri As Integer = 0
For Each x As DataRow In dt.Rows
yusri += 1
yusri081.Row = yusri
yusri081.RowLabel = x("tahun")
yusri081.Column = 1
yusri081.Data = x("pendapatan") / 1000
yusri081.Column = 2
yusri081.Data = x("biaya") / 1000
Next
End Sub
End Class
Public Class latihan41
BalasHapusDim nurul As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; DATA SOURCE =" & Application.StartupPath & "/Data Grafik.accdb")
Dim dt As New DataTable
Private Sub latihan41_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 keuangan", nurul)
dt.Rows.Clear()
a.Fill(dt)
a.Dispose()
dgv.DataSource = dt
ilmi.ColumnCount = 2
ilmi.RowCount = dt.Rows.Count
Dim bota As Integer = 0
For Each x As DataRow In dt.Rows
bota += 1
ilmi.Row = bota
ilmi.RowLabel = x("tahun")
ilmi.Column = 1
ilmi.Data = x("pendapatan") / 1000
ilmi.Column = 2
ilmi.Data = x("biaya") / 1000
Next
End Sub
End Class
Public Class Tugas41_36109067
BalasHapusDim v As New OleDb.OleDbConnection("Provider=microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\Data Grafik.accdb")
Dim dt As New DataTable
Private Sub tugas41_36109067_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim X As New OleDb.OleDbDataAdapter
X = New OleDb.OleDbDataAdapter("Select * From Keuangan", v)
X.Fill(dt)
X.Dispose()
dgv067.DataSource = dt
'Membuat grafik'
chart067.ColumnCount = 2
chart067.RowCount = dt.Rows.Count
'Membuat tabel dalam grafik'
Dim PB As Integer = 0
For Each ina As DataRow In dt.Rows
PB = PB + 1
chart067.Row = PB
chart067.RowLabel = ina("TAHUN")
chart067.Column = 1
chart067.Data = ina("PENDAPATAN") / 1000
chart067.Column = 2
chart067.Data = ina("BIAYA") / 1000
Next
End Sub
End Class