Solved

setting a suitable receipt printer for a VB POS application

Posted on 2003-11-17
4
631 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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Child Form in front 4 47
Excel Automation VBA 19 74
VB6 - Scroll Mouse wheel on Picturebox 13 44
which modules are active in VB6 project? 6 14
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

832 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