本文介绍了结晶报告打印垃圾值..如何删除..?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 Form2.CrystalReportViewer1.ReportSource = Nothing Form2.CrystalReportViewer1.Refresh() Dim obj As mydataset = 新 mydataset 如果 presentdaybal> 0 然后 ' 注意:如果余额> 0然后只有这个条件满足 Dim balrow As DataRow = obj.Tables ( BAL_REG)。NewRow() balrow( facno)= facno balrow( fname)= fname balrow( fbalance )= presentdaybal balrow( fglhead)= fglhead obj.Tables( BAL_REG)。Rows.Add(balrow) 结束 如果 循环 dr.Close() 结束 如果 Dim db As 新 SqlDataAdapter(cmd1) db.Fill(obj, BAL_REG) Form2.Show() Dim cr As 新 ReportDocument cr = 新 Balance_Report cr.SetDataSource(obj。表( BAL_REG)) obj.Reset() Form2。 CrystalReportViewer1.ReportSource = cr 我的出局是: - accno名称余额 00001 xyz 9000 00002 abc 8000 00002 8000 //垃圾值或重复值如何删除这个..? 并通过'检查' distinct'in query no changes 解决方案 Form2.CrystalReportViewer1.ReportSource = Nothing Form2.CrystalReportViewer1.Refresh() Dim obj As mydataset = New mydatasetIf presentdaybal > 0 Then 'NOTE:if balance > 0 then only this condition satisfies Dim balrow As DataRow = obj.Tables("BAL_REG").NewRow() balrow("facno") = facno balrow("fname") = fname balrow("fbalance") = presentdaybal balrow("fglhead") = fglhead obj.Tables("BAL_REG").Rows.Add(balrow) End If Loop dr.Close() End If Dim db As New SqlDataAdapter(cmd1) db.Fill(obj, "BAL_REG") Form2.Show() Dim cr As New ReportDocument cr = New Balance_Report cr.SetDataSource(obj.Tables("BAL_REG")) obj.Reset() Form2.CrystalReportViewer1.ReportSource = crmy out puts are:-accno name balance00001 xyz 900000002 abc 800000002 8000 //garbage value or duplicate value how to remove this ..?and checked by putting 'distinct' in query no changes 解决方案 这篇关于结晶报告打印垃圾值..如何删除..?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 10-28 15:00