Solved

Using Epson posprinter tm-u200b

Posted on 2002-06-22
3
275 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

726 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