Solved

Using Epson posprinter tm-u200b

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…
Suggested Courses
Course of the Month5 days, 12 hours left to enroll

627 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