Solved

Using Epson posprinter tm-u200b

Posted on 2002-06-22
3
273 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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

770 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