Dim t1 As Table = Tables("窗口2_Table1")
MainTable = t1 '选定表为当前表
Dim D As String = "( " & Vars("KJQS").Substring(0,4) & "年" & Vars("KJQS").Substring(4,2) & "月 )"
With Tables("窗口2_Table1").PrintInfo
.Title = "产成品库存月报表" '表标题
.SubTitle = " " &D & " HMQP 4.03-00-05A" ' 副标题
.PageFooter = "第[PageNo]页,共[PageCount]页" '设置页脚
.PaperKind = 9 '设为A4纸
.LandScape = False ' 纵向打印
.FitIntoPage = True ' 自动适用页宽.
.subtitlefont = New Font("黑体",10,FontStyle.Underline)
.titlefont = New Font("黑体",10,FontStyle.Underline)
End With
Tables("窗口2_Table1").Print(True,False)