?
Solved

setting a suitable receipt printer for a VB POS application

Posted on 2003-11-17
4
Medium Priority
?
648 Views
Last Modified: 2013-11-18
guys help. hav ma VB POS running on win98, NT n 2000 but cant print receipts directly to an old epson TM-U210D receipt printer i hav. what do i do? som pple tell me i need a windows cable som say another printer, which one? n when i click print button from my program, the old TM-U210D prints garbage. what do i do? or could it b a com port error? but i fixed a new com port (com2). or could it b da cable (must there b one 4 windows). or could it b settings? i don know!

by the way this printer has been used n being used in receipt printing from a DOS based POS we r trying to replace.

o'wise the receipts r printed very well on any other printers with A4 size, but ma problem is i wanna print on a small paper size receipt printer n directly easily just like any othe printer. is tha possible, how?
ps advice, urgent, any quick hlp ll highly appreciate.

eric, programmer
Nairobi
KENYA
erabby411@yahoo.com
0
Comment
Question by:eric-kenya
[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
4 Comments
 
LVL 4

Accepted Solution

by:
TomLaw1999 earned 375 total points
ID: 9764187
Have you installed a TM-U210D printer driver on your system for this device.
0
 
LVL 30

Expert Comment

by:nmcdermaid
ID: 9764226
As far as I know, VB just goes through the normal Windows print services, so you should try to get it printing from standard Windows Apps first, such as Notepad and Write.

If it doesn't print from standard windows programs, then you may have better luck in the Hardware newsgroups as it is not a VB specific thing.


Good Luck




0
 

Author Comment

by:eric-kenya
ID: 10190563
COMMENT/CONTRIBUTION
by reading the comments n answers provided n practically trying them, hav came up with an easy way of printing direct to any receipt printer from a VB POS: open, close, requery then open n close the record source then set and select the device from your VB codes procedure. Below is a working sample from my POS (a restaurant billing system) Final Bill Click event:-

cmdFinalBill_Click ()

DataEnvironment1.rsReceipts.Open
DtRptFinBill.Sections("Section7").Controls("lblShiftNum").Caption = frmProcessBills.txtShiftNum.Text
DtRptFinBill.Sections("Section2").Controls("lblRname").Caption = frmMain.txtRname.Text
DtRptFinBill.Sections("Section2").Controls("lblRtel").Caption = frmMain.txtRtel.Text
DtRptFinBill.Sections("Section6").Controls("lblWaiter").Caption = frmProcessBills.txtWTname.Text
DtRptFinBill.Sections("Section7").Controls("lblFinAmount").Caption = frmProcessBills.txtFDamount.Text & ".00"
DtRptFinBill.Sections("Section7").Controls("lblPayMode").Caption = frmProcessBills.txtPayMode.Text
DtRptFinBill.Sections("Section7").Controls("lblDiscAmount").Caption = frmProcessBills.txtDiscAmount.Text & ".00"
DtRptFinBill.Sections("Section7").Controls("lblCash").Caption = frmProcessBills.txtCash.Text & ".00"
DtRptFinBill.Sections("Section7").Controls("lblChange").Caption = frmProcessBills.txtChange.Text & ".00"

DtRptFinBill.Sections("Section7").Controls("lblMemName").Caption = frmProcessBills.txtNameMem.Text
DtRptFinBill.Sections("Section7").Controls("lblMemNo").Caption = frmProcessBills.txtNumMem.Text

DtRptFinBill.Sections("Section7").Controls("lblMemName").Visible = True
DtRptFinBill.Sections("Section7").Controls("lblMemNo").Visible = True

DataEnvironment1.rsReceipts.Requery
DtRptFinBill.Sections("Section7").Controls("lblShiftNum").Caption = frmProcessBills.txtShiftNum.Text
DtRptFinBill.Sections("Section2").Controls("lblRname").Caption = frmMain.txtRname.Text
DtRptFinBill.Sections("Section2").Controls("lblRtel").Caption = frmMain.txtRtel.Text
DtRptFinBill.Sections("Section6").Controls("lblWaiter").Caption = frmProcessBills.txtWTname.Text
DtRptFinBill.Sections("Section7").Controls("lblFinAmount").Caption = frmProcessBills.txtFDamount.Text & ".00"
DtRptFinBill.Sections("Section7").Controls("lblPayMode").Caption = frmProcessBills.txtPayMode.Text
DtRptFinBill.Sections("Section7").Controls("lblDiscAmount").Caption = frmProcessBills.txtDiscAmount.Text & ".00"
DtRptFinBill.Sections("Section7").Controls("lblCash").Caption = frmProcessBills.txtCash.Text & ".00"
DtRptFinBill.Sections("Section7").Controls("lblChange").Caption = frmProcessBills.txtChange.Text & ".00"

DtRptFinBill.Refresh

DataEnvironment1.rsReceipts.Close

'selecting and setting the required receipt printer
Dim X As Printer
For Each X In Printers
'Printer.PaperSize = vbPRPSUser
   If X.DeviceName = "EPSON TM-U210D" Then
     'Set printer as system default.
      Set Printer = X
      DtRptFinBill.PrintReport
      ' Stop looking for a printer.
      Exit For
   End If
Next
MsgBox "sent to printer",vbInformation,"Erix POS Hotbill"

End Sub




Best of luck!

eric,
programmer
Nairobi, Kenya
erabby411@yahoo.com
0

Featured Post

Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

Question has a verified solution.

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

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.
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.
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…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…
Suggested Courses
Course of the Month9 days, 15 hours left to enroll

762 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