主题:关于网络打印问题
下面是 fyyyly给我的打印程序,我单机测试完成了。后来我想把打印机共享放在收款那里,下面的网络电脑完成后打印,都在款台一块取然后交钱。可是打印机已经共享了。打印也行了。网络打印一个txt文件也行,就是用下面命令没有反应。怎么弄。教教我。或者折个打印程序就根本不能用于网络打印。
Use 数据表
Sum 金额 To 合计金额
Go Top
my_open = FOPEN("LPT1",1) &&打开通讯口
=FWRITE( my_open , " 购物明细 №:"+单据号+CHR(10))
=FWRITE( my_open , "---------------------------------------"+ CHR(10))
=FWRITE( my_open , "品名 数量 单位 单价 金额"+ CHR(10))
=FWRITE( my_open , "---------------------------------------"+ CHR(10))
Do Whil !Eof()
=FWRITE( my_open , 商品名称+Str(数量,4)+" "+单位+" "+Str(单价,6,1)+" "+Str(金额,8,1)+CHR(10))
Skip
Enddo
=FWRITE( my_open , CHR(10))
=FWRITE( my_open , "---------------------------------------"+ CHR(10))
=FWRITE( my_open , "合计金额:"+Alltrim(Str(合计金额,8,1))+CHR(10))
=FWRITE( my_open , "谢谢惠顾 收银员:"+Alltrim(收银员)+CHR(10))
=FWRITE( my_open , CHR(10)) &&换行,即空行,根据用纸大小适当增减
=FWRITE( my_open , Chr(27)+"p"+Chr(0)+Chr(60)+Chr(255))&&打开钱箱
=FCLOSE(my_open) &&关闭
Use 数据表
Sum 金额 To 合计金额
Go Top
my_open = FOPEN("LPT1",1) &&打开通讯口
=FWRITE( my_open , " 购物明细 №:"+单据号+CHR(10))
=FWRITE( my_open , "---------------------------------------"+ CHR(10))
=FWRITE( my_open , "品名 数量 单位 单价 金额"+ CHR(10))
=FWRITE( my_open , "---------------------------------------"+ CHR(10))
Do Whil !Eof()
=FWRITE( my_open , 商品名称+Str(数量,4)+" "+单位+" "+Str(单价,6,1)+" "+Str(金额,8,1)+CHR(10))
Skip
Enddo
=FWRITE( my_open , CHR(10))
=FWRITE( my_open , "---------------------------------------"+ CHR(10))
=FWRITE( my_open , "合计金额:"+Alltrim(Str(合计金额,8,1))+CHR(10))
=FWRITE( my_open , "谢谢惠顾 收银员:"+Alltrim(收银员)+CHR(10))
=FWRITE( my_open , CHR(10)) &&换行,即空行,根据用纸大小适当增减
=FWRITE( my_open , Chr(27)+"p"+Chr(0)+Chr(60)+Chr(255))&&打开钱箱
=FCLOSE(my_open) &&关闭