[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 659
  • Last Modified:

setting a suitable receipt printer for a VB POS application

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
eric-kenya
Asked:
eric-kenya
1 Solution
 
TomLaw1999Commented:
Have you installed a TM-U210D printer driver on your system for this device.
0
 
nmcdermaidCommented:
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
 
eric-kenyaAuthor Commented:
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

Technology Partners: 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!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now