Printer.Width = 13488
Printer.Height = 15872
Printer.ScaleMode = vbCentimeters
Printer.Font = "宋体"
Printer.FontSize = "11"
Printer.ScaleTop = 0
Printer.ScaleLeft = -1
Dim j As Integer
j = 2
For i = 0 To MSHFlexGrid1.Rows - 1
Printer.CurrentX = 3
Printer.CurrentY = 0.1
Printer.Print "储蓄操作详细清单" & Space(2) & "营业员:" & yyy.gh & Space(3) & "日期:" & nowdate & " 总金额:" & khzje + xczje & " 新开户:" & khzje & " 续存:" & xczje
MSHFlexGrid1.Row = i
MSHFlexGrid1.Col = 0
Printer.CurrentX = 0.5
Printer.CurrentY = j * 0.4
Printer.Print MSHFlexGrid1.Text
MSHFlexGrid1.Col = MSHFlexGrid1.Col + 1
Printer.CurrentX = 3
Printer.CurrentY = j * 0.4
Printer.Print MSHFlexGrid1.Text
MSHFlexGrid1.Col = MSHFlexGrid1.Col + 1
Printer.CurrentX = 5.5
Printer.CurrentY = j * 0.4
Printer.Print MSHFlexGrid1.Text
MSHFlexGrid1.Col = MSHFlexGrid1.Col + 1
Printer.CurrentX = 8
Printer.CurrentY = j * 0.4
Printer.Print MSHFlexGrid1.Text
MSHFlexGrid1.Col = MSHFlexGrid1.Col + 1
Printer.CurrentX = 10.5
Printer.CurrentY = j * 0.4
Printer.Print MSHFlexGrid1.Text
MSHFlexGrid1.Col = MSHFlexGrid1.Col + 1
Printer.CurrentX = 13
Printer.CurrentY = j * 0.4
Printer.Print MSHFlexGrid1.Text
j = j + 1
If Printer.CurrentY > 26 Then
j = 2
Printer.NewPage
End If
Next
Printer.EndDoc
Printer.Height = 15872
Printer.ScaleMode = vbCentimeters
Printer.Font = "宋体"
Printer.FontSize = "11"
Printer.ScaleTop = 0
Printer.ScaleLeft = -1
Dim j As Integer
j = 2
For i = 0 To MSHFlexGrid1.Rows - 1
Printer.CurrentX = 3
Printer.CurrentY = 0.1
Printer.Print "储蓄操作详细清单" & Space(2) & "营业员:" & yyy.gh & Space(3) & "日期:" & nowdate & " 总金额:" & khzje + xczje & " 新开户:" & khzje & " 续存:" & xczje
MSHFlexGrid1.Row = i
MSHFlexGrid1.Col = 0
Printer.CurrentX = 0.5
Printer.CurrentY = j * 0.4
Printer.Print MSHFlexGrid1.Text
MSHFlexGrid1.Col = MSHFlexGrid1.Col + 1
Printer.CurrentX = 3
Printer.CurrentY = j * 0.4
Printer.Print MSHFlexGrid1.Text
MSHFlexGrid1.Col = MSHFlexGrid1.Col + 1
Printer.CurrentX = 5.5
Printer.CurrentY = j * 0.4
Printer.Print MSHFlexGrid1.Text
MSHFlexGrid1.Col = MSHFlexGrid1.Col + 1
Printer.CurrentX = 8
Printer.CurrentY = j * 0.4
Printer.Print MSHFlexGrid1.Text
MSHFlexGrid1.Col = MSHFlexGrid1.Col + 1
Printer.CurrentX = 10.5
Printer.CurrentY = j * 0.4
Printer.Print MSHFlexGrid1.Text
MSHFlexGrid1.Col = MSHFlexGrid1.Col + 1
Printer.CurrentX = 13
Printer.CurrentY = j * 0.4
Printer.Print MSHFlexGrid1.Text
j = j + 1
If Printer.CurrentY > 26 Then
j = 2
Printer.NewPage
End If
Next
Printer.EndDoc
http://www.triaton.com.cn/Private/Zip/DatGrdRpt.zip DataReport 程序
http://www.triaton.com.cn/Private/Zip/DatRpt.zip用 DataReport 打印 BarCode
http://www.triaton.com.cn/Private/Zip/BarCodeRpt.zip
dim xlApp as Excel.application
dim xlBook as excel.workbook
dim xlSheet as excel.worksheeet
set xlapp=createObject("excel.application")
set xlbook=xlapp.workbooks.open("excel模板文件名") '打开模板文件
set xlsheet=xlbook.worksheets(1) '打开当前工作簿的第一页
.........
马上完成
指标如下:
可以直接绑定 MSHFLEXGRID 控件
页眉页角
页号
名称
正文
备注
可以动态设置位置(名称,正文,备注,MSH)
可以使用多模板
还有4天时间完成
需要留下EMAIL
;、'如果你们有特殊功能请提出来
www.orient-orchid.com
和这个datagrid是同一个玩意么?我的信箱[email protected]....^_^^_^
cn.execute "select * into sheetname in '' [database=" & app.path & "\test.xls;Excel 5.0] from test where 你的条件"
[email protected]