Solved

Using Epson posprinter tm-u200b

Posted on 2002-06-22
3
271 Views
Last Modified: 2010-08-05
I am wanto print a ticket in the pos printer.
but only it prints 20 lines, no print more lines.
the print.enddoc always it's makeit.
somebody to help me pls.

Code wrote to print:
sub PrintInvoice()
   On Error Resume Next
   Dim totGrav As Currency
   Dim totExen As Currency
   Printer.ScaleMode = 4   'Character
   'Printer.FontName = "Courier New"
   Printer.FontSize = 10
   Printer.FontBold = True
   '                       1         2         3         4
'                 1234567890123456789012345678901234567890
   Printer.Print PadC("jjjjjjjjjjjjjj", 40)
   Printer.FontBold = False
   Printer.Print PadC("nnnnnnnnnnnnnnn", 40)
   Printer.Print PadC("IVA D.L. 296 : GASOLINERA Y CAFETERIA", 40)
   Printer.Print PadC("NCR(IVA):999 NIT:00000000000000", 40)
   Printer.Print "ALAM. MANUEL E. ARAUJO / CALLE NVA 1 Y 2"
   Printer.Print "FECHA:" & FormatDateTime(Date, vbShortDate) & "  HORA:" & FormatDateTime(Time, vbLongTime)
   Printer.Print "CAJA No.1       TIKET No.:"; Trim(txtCampo(1))
   Printer.Print "CAJERO(A):" & wUser
   Printer.Print Space(1)
   
   Printer.Print "========================================"
   Printer.Print "CAN  DETALLE PRODUCTO  *   P/U   SUBTOT "
   Printer.Print "========================================"
   With Data2.Recordset
      .MoveFirst
      Do While Not .EOF
         Printer.Print Pad_Str(!cantidad, " ", 3, True) + _
                      Space(1) + Pad_Str(Left(!descripcion, 17), " ", 17, False) + _
                      Space(1) + IIf(!exento, "E", "G") + _
                      Space(1) + Pad_Str(FormatNumber(!precio, 2), " ", 8, False) + _
                      Space(1) + Pad_Str(FormatNumber(!totventa + !valiva, 2), " ", 9, False)
         If !exento Then
            totExen = totExen + !totventa
         Else
            totGrav = totGrav + !totventa + !valiva
         End If
         .MoveNext
      Loop
   End With
   Printer.Print "========================================"
   Printer.Print Pad_Str("TOTAL GRAVADOS ", " ", 31, False) + Pad_Str(FormatNumber(totGrav, 2), " ", 9, True)
   Printer.Print Pad_Str(" TOTAL EXENTOS ", " ", 31, False) + Pad_Str(FormatNumber(totExen, 2), " ", 9, True)
   Printer.Print Pad_Str("    GRAN TOTAL ", " ", 31, False) + Pad_Str(FormatNumber(totExen + totGrav, 2), " ", 9, True)
   Printer.Print Pad_Str("RECIBIDO $     ", " ", 31, False) + Pad_Str(FormatNumber(txtTotal(3), 2), " ", 9, True)
   Printer.Print Pad_Str("      CAMBIO $ ", " ", 31, False) + Pad_Str(FormatNumber(txtTotal(4), 2), " ", 9, True)
   Printer.Print Space(1)
   Printer.Print " * PRODUCTOS  G) GRAVADOS  E) EXENTOS"
   Printer.Print PadC("GRACIAS POR SU COMPRA, VUELVA PRONTO", 40)
   'Printer.CurrentX
   Printer.EndDoc
End sub

Notes:
padc and pad_str are user functions.
0
Comment
Question by:jmgs082598
3 Comments
 
LVL 4

Accepted Solution

by:
mcoop earned 200 total points
ID: 7101392
I suspect that the page length is set to a default somewhere else...  (perhaps default as installed)

You need to put your application aside for a while, and do some detailed experimentation with the printer alone.

Have a look at the page length functions (and the associated Knowledge Base items) - to determine how your printer behaves at page boundaries.  There may also be an escape sequence you need to send to the printer to enable/disable page jumps.

Or - you may need to set a very long, or a very short page length - in order to create what you ae looking for.

I doubt that these printers were designed to be Windows printers as such (they work with Windows as a side-effect of their design, so you may find that there a few variables that you would not normally have to consider when printing to these units...  including some things like the paper cutter and form feed functions.
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7923766
Hi jmgs,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Accept mcoop's comment(s) as an answer.

jmgs, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept this comment as an answer.
==========
DanRollins -- EE database cleanup volunteer
0
 

Expert Comment

by:SpideyMod
ID: 7968475
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now