Page 1 of 1

print with epson 220

PostPosted: Mon Sep 14, 2015 1:40 am
by yanzco
hello, is it possible to be able to print with Epson TM-U220 pos printer?

i made something like a ticket maker for documenting.. and i need fast printing..

would it work with neobook's / dbpro normal print option?

all i needed to print was


--------------------------------------
time entry: 09:20 am
ticket # 222315
total: 4225.00
paid: 5000.00
change: 775.00
staff name: loremp impsum
------------------------------------------

Re: print with epson 220

PostPosted: Mon Sep 14, 2015 5:51 am
by Gaev
yanzco:

Try and use FileWrite command ...

1) From the Help file ...
file name

The name of an existing external file. You can insert the name of a communications port (COM1, COM2, etc.) here instead of a file name to send data to an external device instead.

2) Use Append for the second parameter (line number).

3) You can compose your Data like this ...
Code: Select all
SetVar "[NewLineCode}" "[#13]"
SetVar "[myPrintdata]" "time entry: 09:20 am"
SetVar "[myPrintdata]" "[myPrintData][NewLineCode]ticket # 222315"
SetVar "[myPrintdata]" "[myPrintData][NewLineCode]total: 4225.00"
SetVar "[myPrintdata]" "[myPrintData][NewLineCode]paid: 5000.00"
SetVar "[myPrintdata]" "[myPrintData][NewLineCode]change: 775.00"
SetVar "[myPrintdata]" "[myPrintData][NewLineCode]staff name: loremp impsum"

When this works, you can replace the absolute values with [NeoBookVariables] e.g.
Code: Select all
SetVar "[myPrintdata]" "[myPrintData][NewLineCode]ticket # [thisTicketNumber]"

Re: print with epson 220

PostPosted: Mon Sep 14, 2015 6:41 pm
by Neosoft Support
If that doesn't work you could also try use DBPro's Report Designer to create a report specifically for that printer. In Report Designer select Report Properties from the File menu. Select your printer (and database if you're using one). Then choose Page Properties from the Page menu and set the paper size. Then add whatever you want to the report.

Re: print with epson 220

PostPosted: Tue Sep 15, 2015 9:54 am
by yanzco
Gaev wrote:yanzco:

Try and use FileWrite command ...

1) From the Help file ...
file name

The name of an existing external file. You can insert the name of a communications port (COM1, COM2, etc.) here instead of a file name to send data to an external device instead.



hi gaev, what if the pos printer is conected to usb port of the computer?..

Re: print with epson 220

PostPosted: Tue Sep 15, 2015 10:08 am
by Gaev
yanzco:

what if the pos printer is conected to usb port of the computer?..

How do other programs reference this printer ? ... COM1 ? LPT1 ? ... or do they just write to the X: drive (X can be any letter) ?

Re: print with epson 220

PostPosted: Tue Sep 15, 2015 6:27 pm
by Neosoft Support
I'm not sure if FileWrite will work with printers connected via USB.

Re: print with epson 220

PostPosted: Tue Sep 15, 2015 9:00 pm
by David de Argentina
You could use the NeoThinBasic print engine.

NeoThinBasic has two modules to print:

a) XPrint, for windows driver based printers

b) LPrint, for serial or paralell printers.

My 0.01
David de Argentina

Re: print with epson 220

PostPosted: Wed Sep 16, 2015 1:50 am
by yanzco
@admin, any guide how to use dbpro report designer?..
ive been having trouble with it for a long time.. dont know how to use it..
or arrange texts i want it to display..

Re: print with epson 220

PostPosted: Wed Sep 16, 2015 6:12 pm
by Neosoft Support
any guide how to use dbpro report designer?


The Report Designer has a help file that should get you started. If you just need a simple printout, you can ignore the partitions and just use the Text/Field tool to add text and NeoBook variables to the page. When printed from NeoBook the report will automatically populate any variables you use before printing.

Re: print with epson 220

PostPosted: Wed Sep 16, 2015 7:58 pm
by yanzco
alright, ill take a look..
btw, the tech on epson told me, the pos printer could also print using the cmd commands..

so, i was wondering, can neobook issue a cmd command on a press button?..
i think last time i saw was.. cmd command - obsolete.. ? :O
(cant check right now, not at home..)

Re: print with epson 220

PostPosted: Wed Sep 16, 2015 9:08 pm
by Gaev
yanzco:

the tech on epson told me, the pos printer could also print using the cmd commands.

Ask the tech to provide you with an example of the command that should be used to print to your printer connected via the usb port (this web page lists all the commands you can use).

Then try it out using CMD Prompt in Windows' Start Menu.

When that works, you can invoke the same request from your NeoBook pub using NeoBook's Run command ... according to the Help file ...
Purpose:
Execute an external Windows application or DOS command.

Syntax:
Run "command" "parameters" "options" "subroutine" "variable"

Re: print with epson 220

PostPosted: Thu Sep 17, 2015 9:28 pm
by yanzco
i have finally got it to work and saw it print in person..

Epson TM-T82
Image


it worked using

saving what i wanted to be printed on a txt file..

print success with
PrintTextFile
PrintDataFile

also print success with report designer
and print database tables
dbpPrintReport
(with and without dialog)

:D im so happy.. thank you to all.. :D

Re: print with epson 220

PostPosted: Thu Sep 17, 2015 10:36 pm
by Gaev
yanzco:

saving what i wanted to be printed on a txt file..

print success with
PrintTextFile
PrintDataFile

Just curious ... is the Epson your only/default printer on this machine ? ... or did you have to do anything (outside your NeoBook Pub) to define this printer as your "Default Printer" ?

Re: print with epson 220

PostPosted: Thu Sep 17, 2015 11:25 pm
by yanzco
Gaev wrote:yanzco:

saving what i wanted to be printed on a txt file..

print success with
PrintTextFile
PrintDataFile

Just curious ... is the Epson your only/default printer on this machine ? ... or did you have to do anything (outside your NeoBook Pub) to define this printer as your "Default Printer" ?



yes, i had it the only printer installed in the station..
it was a usb pos printer..
there was for other socket, but i insisted to try it on the usb version..

PrintTextFile and PrintDataFile had a window asking which printer.. ( the normal printing options window)
the option was set to default printer: generic

the dbpPrintReport also had one if with dialog..

but if you opt for no dialog.. it would print automatically..


edit: it was tested on the epson store on their computers on display..
so maybe the drivers for the printer were already pre installed..

the printer is also expensive.. it was 16500php.. or 375usd.. :O