如何将数据库中数据添加到临时表?
Dim conStart As WinForm.DateTimePicker = e.Form.Controls("DateTimeStart")
Dim conEnd As WinForm.DateTimePicker = e.Form.Controls("DateTimeEnd")
For Each dr1 As DataRow In DataTables("Sales_Order_List").Select("CustomerId='115'")'在时间表中选择符合条件范围的时间("SubmitDate >= #" & conStart.text & "# And SubmitDate <= #" & conEnd.text & "#")'
Dim dr2 As DataRow = DataTables("TempTime").AddNew()'新添加一行
For Each dc1 As DataCol In DataTables("Sales_Order_List").DataCols
dr2("Id") = dr1("Id")
dr2("CCustomerId") = dr1("CustomerId")
dr2("CSubmitId") = dr1("SubmitUser")
dr2("CSubmitDate") = dr1("SubmitDate")
Next
Next
这样的代码预览完全没有数据,但是打印的话是有数据的,就是数据库中肯定有这条记录