Solved

setting a suitable receipt printer for a VB POS application

Posted on 2003-11-17
4
623 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
4 Comments
 
LVL 4

Accepted Solution

by:
TomLaw1999 earned 125 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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Every business owner understands the significance of online customer reviews and the impact it can have on sales and revenues. With technology advancing at such a rapid pace, getting online reviews has never been easier, especially when many regions…
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…
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:

747 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

11 Experts available now in Live!

Get 1:1 Help Now