试试OrchidPrinter
www.orient-orchid.com

解决方案 »

  1.   

    Private Sub PrintReport_Click()
       
       Call PrintTable
       Call PrintData
       
       Printer.EndDoc
       
    End SubPrivate Sub PrintTable()
       
        Printer.ScaleMode = 3
        Printer.Font = "宋体"
        Printer.FontSize = 13
    '    Printer.FontBold = True
        Printer.CurrentX = 52: Printer.CurrentY = 0
        Printer.Print "报表标题"
        
    '    Printer.DrawWidth = 2
        Printer.Line (20, 25)-(375, 349), , B
        Printer.Line (155, 25)-(155, 349)
        
        Dim i As Long
        For i = 1 To 9
            Printer.Line (20, 25 + i * 36)-(375, 25 + i * 36)
        Next i
        
        Printer.CurrentX = 48: Printer.CurrentY = 38
        Printer.Print "年 限"
        Printer.CurrentX = 48: Printer.CurrentY = 74
        Printer.Print "地 区"
        Printer.CurrentX = 48: Printer.CurrentY = 110
        Printer.Print "类 别"
        Printer.CurrentX = 48: Printer.CurrentY = 146
        Printer.Print "等 级"
        Printer.CurrentX = 41: Printer.CurrentY = 182
        Printer.Print "班、线"
        Printer.CurrentX = 48: Printer.CurrentY = 218
        Printer.Print "线 检"
        Printer.CurrentX = 41: Printer.CurrentY = 254
        Printer.Print "质检员"
        Printer.CurrentX = 48: Printer.CurrentY = 290
        Printer.Print "重 量"
        Printer.CurrentX = 48: Printer.CurrentY = 326
        Printer.Print "签 名"
        
        Printer.CurrentX = 20: Printer.CurrentY = 359
        Printer.Print "日期:"
        Printer.CurrentX = 20: Printer.CurrentY = 374
        Printer.Print "时间:"
        Printer.CurrentX = 20: Printer.CurrentY = 389
        Printer.Print "序号:"
       
    End SubPrivate Sub PrintData()
       
        Printer.CurrentX = 177: Printer.CurrentY = 38
        Printer.Print "2002年"
        Printer.CurrentX = 177: Printer.CurrentY = 74
        Printer.Print "reyre"
        Printer.CurrentX = 177: Printer.CurrentY = 110
        Printer.Print "ryre"
        Printer.CurrentX = 177: Printer.CurrentY = 146
        Printer.Print "dhre"
        Printer.CurrentX = 177: Printer.CurrentY = 182
        Printer.Print "一班"
        Printer.CurrentX = 177: Printer.CurrentY = 290
        Printer.Print "453" & " kg"
        Printer.CurrentX = 106: Printer.CurrentY = 359
        Printer.Print Format(Date, "YYYY-MM-DD")
        Printer.CurrentX = 106: Printer.CurrentY = 374
        Printer.Print Format(Time, "HH:MM:SS")
        Printer.CurrentX = 106: Printer.CurrentY = 389
        Printer.Print "3234"
       
    End Sub