[vb6]
Hi
I have some code to print of a few pages with 3 columns, the first page has a title and a few details. at the end are some other details that occur only at the end.
The columns are generated by a recursive loop returning values from a function.
I can use .currentY to set the top margin on the first page but the second page starts printing straight at the top.
It may be ,y printers settings as it is a networked office photocopier/scanner/printer/superman. and the second page is printed on the back of the first (which points me to the printer settings).
But i was wondering If i was just coding it wrong instead? Code Below
muchos gracias folks![]()
PS: Idont want to use a data report, taCode:Sub showDataReport() Dim intX As Integer Dim intI As Integer Dim intIMax As Integer Dim prtNum As String Dim prtQty As String Dim prtFault As String For intX = 0 To Printer.FontCount - 1 If Printer.Fonts(intX) Like "Monospac821 BT" Then Printer.FontName = Printer.Fonts(intX) Exit For End If Next 'Printer.CurrentY = 600 'Set top margin (Only does first page?) Printer.FontBold = True 'Makes Font Bold Printer.FontSize = 18 'Sets Heading Font Size Printer.Print "" Printer.Print "" pline = String(122, " ") Mid$(pline, 14, 27) = "Repair Station Scrap Report" Printer.Print pline Printer.FontBold = False Printer.FontSize = 12 pline = String(122, " ") Mid$(pline, 36, 9) = "FCD#: XXX" Printer.Print pline pline = String(144, " ") Mid$(pline, 28, 26) = Date & " : " & Time & " : " + Left$(Users_FirstName, 1) + Left$(Users_Surname, 1) Printer.Print pline Printer.Print "" Printer.Print "" pline = String(144, " ") Mid$(pline, 15, 11) = "Part Number" Mid$(pline, 37, 8) = "Quantity" Mid$(pline, 56, 5) = "Fault" Printer.Print pline Printer.Print "" For Index = 12 To 16 intIMax = getQuery(REPAIR_FORM.fault(Index).Caption) For intI = 1 To intIMax If (queryCount(intI) <> "") Then prtNum = Mid$(queryCount(intI), (InStr(queryCount(intI), ".") + 1)) prtQty = Left$(queryCount(intI), (InStr(queryCount(intI), ".") - 1)) prtFault = REPAIR_FORM.fault(Index).Caption 'OP data to printer line pline = String(144, " ") Mid$(pline, 15, (Len(prtNum))) = prtNum Mid$(pline, (40 - ((Len(prtQty)) / 2)), (Len(prtQty))) = prtQty Mid$(pline, 56, (Len(prtFault))) = prtFault Printer.Print pline End If Next Next Printer.Print "" Printer.Print "" Printer.Print "" Printer.FontBold = True pline = String(144, " ") Mid$(pline, 5, 42) = "Team Leader Signature: ____________________" Mid$(pline, 52, 16) = "Date: __________" Printer.Print pline Printer.EndDoc End Sub




Reply With Quote