charge invoice and sales invoice im using two listview , my problem is if the sales invoice is greater than charge invoice they cannot be diplay or charge invoice is greater than sales invoice also cannot be display but if they are both equal they display ? whats wrong with my code po.

both in crystal report

sales invoice charge invoice

        invoice no.        amount            invoice no.          customer name          amount

thats the tables looks like . in my crystal report, hope you can help fix it. need for my project

Private Sub ParaPrint()

    Dim ds As New DataSet1
    Dim dst As New DataTable

    Dim lvii As Integer
    Dim lvii2 As Integer

    lvii = ListView_salesInvoice.Items.Count - 1
    lvii2 = listview2_chargeinvoice.Items.Count - 1
    dst = ds.Tables.Add("Items")
    dst.Columns.Add("namecus", Type.GetType("System.String"))
    dst.Columns.Add("cashforward", Type.GetType("System.String"))

    dst.Columns.Add("Dateprint", Type.GetType("System.String"))

    dst.Columns.Add("saleinvo", Type.GetType("System.String"))
    dst.Columns.Add("chargeinvo", Type.GetType("System.String"))
    dst.Columns.Add("totalamount", Type.GetType("System.String"))

    dst.Columns.Add("invoOR", Type.GetType("System.String"))
    dst.Columns.Add("invoAmount", Type.GetType("System.String"))
    dst.Columns.Add("chargeOR", Type.GetType("System.String"))
    dst.Columns.Add("ChargeName", Type.GetType("System.String"))
    dst.Columns.Add("chargeAmount", Type.GetType("System.String"))
    Dim r As DataRow

    r = dst.NewRow()

    r("namecus") = frmOrderTransaction.lblname.Text
    r("Dateprint") = dets.ToString("MM/dd/yyyy")
    r("cashForward") = lblcashforward.Text
    r("saleinvo") = lblsalesamount.Text
    r("chargeinvo") = lblchargeamount.Text
    r("totalamount") = lbltotalamountcash.Text

    Dim lisg As ListViewItemCollection
    lisg = ListView_salesInvoice.Items

    Dim lsg As ListViewItemCollection
    lsg = listview2_chargeinvoice.Items

    Dim kkk = lisg.Count + lsg.Count
    If lisg.Count = lsg.Count And lisg.Count <> 0 And lsg.Count <> 0 Then

        For i = 0 To kkk - 1

            r = dst.NewRow()
            If lisg.Count <= kkk Then
                    r("invoOR") = lisg.Item(i).SubItems(1).Text
                    r("invoAmount") = FormatNumber(lisg.Item(i).SubItems(2).Text)
                Catch ex As Exception

                End Try

            End If

            If lsg.Count <= kkk Then
                    r("chargeOR") = lsg.Item(i).SubItems(1).Text
                    r("ChargeName") = lsg.Item(i).SubItems(2).Text
                    r("chargeAmount") = FormatNumber(lsg.Item(i).SubItems(3).Text)
                Catch ex As Exception

                End Try

            End If


    End If

    Dim objrpt As New SalesReporting


    frmReport.crv1.ReportSource = objrpt
    frmReport.WindowState = FormWindowState.Normal
    frmReport.TopMost = True

End Sub

Odd use of capstone, but capstone course would make sense.

A capstone course, also known as capstone unit or a senior thesis or senior seminar serves as the culminating and usually integrative experience of an educational program. ... The term derives from the final decorative coping or "cap-stone" used to complete a building or monument.

Back to your issue. Usually I have to put in debug statements to see where the issue is. But as you are not using, C# or such you'll have to leverage what your system has to find why the values diverge.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.