Dim sp As WinForm.SplitPanel = e.Form.Controls("SplitContainer1").Panel1 Dim doc As PrintDoc = e.Form.GernatePrintDoc(sp) Dim t As Table = Tables("收费明细") For i As Integer = 0 To t.Rows.Count -1 If t.Rows(i)("打印状态") = 0 Then t.Position = i doc.Preview() r.Rows(i)("打印状态") = 1 Exit For End If Next