Hey guys
Im having a problem in my crystal report where i want to see the sum of the quantity of items and their subtotal but my crystal report seems to sum the wrong data
here is the data when i run my program and preview the crystal report:
what i want to see is the sum of the quantity and the subtotal not the number of items listed in the report
but when i preview the crystal report using report preview the sum of data is working
here is the crystal report when i don't run my program:
here is my code when viewing crystal report in my program:
please help me guysCode:Public Sub ReportTotalSalesItems(ByVal LV As ListView) Dim rReport As New ReportTotalSales Dim row As DataRow = Nothing Dim ds As New DataSet ds.Tables.Add("SalesTransactionDetails") With ds.Tables(0).Columns .Add("InvoiceNo") .Add("ProductCode") .Add("ProductName") .Add("QuantitySold") .Add("SubTotal") End With For Each LVI As ListViewItem In LV.Items row = ds.Tables(0).NewRow row(0) = LVI.Text row(1) = LVI.SubItems(1).Text row(2) = LVI.SubItems(2).Text row(3) = LVI.SubItems(3).Text row(4) = LVI.SubItems(4).Text ds.Tables(0).Rows.Add(row) Next rReport.SetDataSource(ds.Tables(0)) ReportViewer.CrystalReportViewer1.ReportSource = rReport![]()




Reply With Quote
