Dim doc As New PrintDoc '定义一个报表
Dim rx As prt.RenderText '定义一个文本对象
Dim CurRow As Row
If Tables("表A").count > 0 Then
For i As Integer = 0 To Tables("表A").Count - 1
CurRow = Tables("表A").Rows(i)
Doc = New PrintDoc
doc.PageSetting.Width = 230 '纸张宽度为230毫米
doc.PageSetting.Height = 100 '纸张高度为100毫米
doc.AutoRotate = False
rx = new prt.RenderText
rx.Text = CurRow("第一列")
rx.x = 20
rx.y = 20
doc.body.Children.Add(rx)
doc.Print() '打印报表
Next
End If
请问,执行上述代码时,如何使"表A"中光标始终定位在正在打印的行上?
如果缺纸或卡纸,光标停在该行不动.
打印完毕后,光标自动移至下一行,打印机才又开始自动打印.