Member 12544512 Ответов: 1

Отправка данных из datagridview в crystal report с помощью VB.NET


Hy guys
I have one problem.

I have 3 important column, they are: Nama,Hasil, and Satuan.
Nama and Satuan column is getting from database
But not for Hasil column
Value for Hasil column is entered manual,
so How can I get that value in crystal repotrt?
Would you like to see and help me?
Thank you very much


Что я уже пробовал:

Dim MyRrpt As New CR_TestOrder2
    Dim dsOrder As New DataSet

    Dim listkode As New List(Of String)
    Dim row As DataGridViewRowCollection
    row = dgv_hasillab.Rows

    dt_order = New DataTable
    dt_order.Clear()
    dt_order.Columns.Add("Pemeriksaan")
    dt_order.Columns.Add("Hasil")
    dt_order.Columns.Add("Nilairujukan")
    dt_order.Columns.Add("Satuan")

    For j As Integer = 0 To dgv_hasillab.Rows.Count - 1
        Dim cek As Boolean = CBool(row(j).Cells(6).Value)
        If cek = True Then
            dt_order.Rows.Add(row(j).Cells(1).Value, row(j).Cells(2).Value, row(j).Cells(3).Value, row(j).Cells(4).Value)
        End If
    Next

    dsOrder.Tables.Add(dt_order)
    'aman -cara I
    Frm_TestOrder.crv_testorder.SelectionFormula = "{tabelpasien.nama}='" + txt_namaOrder.Text + "'"
    MyRrpt.SetDataSource(dt_order)

    Frm_TestOrder.crv_testorder.ReportSource = MyRrpt
    Frm_TestOrder.crv_testorder.Refresh()
    Frm_TestOrder.Show()

1 Ответов

Рейтинг:
2

William J. Wright

На какой точке вы застряли?

Может быть, это поможет. https://www.youtube.com/watch?v=bezhqdUwqV8