以下是引用lwj396086371在2014-4-2 10:07:00的发言:
可能我没说清楚,那么在5楼所附截图中,根据“收款明细”表怎样生成“收据明细列表”,帮忙写一下代码
Dim cs() As String = {"设备款","保证金","运费"}
For Each dr As DataRow In DataTables("收款明细").Select("是否打印 = true", Tables("收款明细").Filter)
For Each c As String In cs
If dr.IsNull(c) = False Then
Dim ndr As DataRow = DataTables("收据明细").AddNew
ndr("单号") = dr("单号")
ndr("客户名称") = dr("客户名称")
ndr("收款事由") = c
ndr("金额") = dr(c)
End If
Next
Next