Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Text file printing
Message
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Title:
Text file printing
Miscellaneous
Thread ID:
00832905
Message ID:
00832905
Views:
69
Good Day To All :)



I have recently switch back to text printing (not using the report designer) since printing is much faster this way. My problem is when running the procedure, a form feed is performed before the data is printed. heres the following code and maybe one of you can determine what went wrong.


Set PRINTER FONT 'Times New Roman', 10
Set device to printer
Set printer to default
Set printer on
Store printstatus() to pready
If pready = .t.
*!* Printjob
@ prow()+2,100 say thisform.rnum_c10.value
@ prow()+2 ,101 say thisform.date_d.value
@ prow()+4,5 say 'Customer: '
@ prow(),90 say 'TERMS :'+' '+alltrim(str(thisform.days.value))
@ prow(),15 say alltrim(str(thisform.cuscod_n6.value))+' '+alltrim(thisform.cname_c40.value)
@ prow()+1,5 say 'Address : '
@ prow(),15 say alltrim(thisform.add_m.value)
@ prow(),90 say 'Due Date :'
@ prow(),104 say thisform.ddue_d.value
@ prow()+2,5 say 'Salesman : '
@ prow(),15 say alltrim(thisform.sman_c5.value)+' '+alltrim(thisform.smname_c30.value)
@ prow()+3,5 say '_________________________________________________________________________________________________________'
@ prow()+1,5 say 'Item Code '
@ prow(),23 say 'Quantity'
@ prow(),50 say 'Item Name'
@ prow(),105 say 'Unit Price'
@ prow(),122 say 'Sub Total'
@ prow()+1,19 say 'Case / Wholes / Pieces'
@ prow(),5 say '_________________________________________________________________________________________________________'
@ prow()+1,5 say ''
Select sales
Go top
cntr = 1
Scan while .t.
@ prow()+1,5 say alltrim(sales.icode_C15)
@ prow(),19 say ' / / '
Do case
Case alltrim(sales.invtype_c1)=='C'
@ prow(),20 say alltrim(str(sales.qty_n13))
Case alltrim(sales.invtype_c1)=='P'
@ prow(),28 say alltrim(str(sales.qty_n13))
Case alltrim(sales.invtype_c1)=='E'
@ prow(),38 say alltrim(str(sales.qty_n13))
Endcase
@ prow(),46 say sales.iname_c40
@ prow(),110-LEN(ALLTRIM(STR(sales.sell_n10))) say transform(sales.sell_n10,'9,999,999.99')
@ prow(),125-LEN(ALLTRIM(STR(sales.TOTAL_n13))) say transform(sales.TOTAL_n13,'9,999,999.99')
mnt = mnt+sales.TOTAL_n13
If cntr>28
@ prow()+3,5 say '_________________________________________________________________________________________________________'
Eject Page
@ prow()+3,5 say '_________________________________________________________________________________________________________'
@ prow()+2,5 say 'Item Code '
@ prow(),23 say 'Quantity'
@ prow(),41 say 'Item Name'
@ prow(),105 say 'Unit Price'
@ prow(),118 say 'Sub Total'
@ prow()+1,19 say 'Case / Wholes / Pieces'
@ prow(),5 say '_________________________________________________________________________________________________________'
@ prow()+1,5 say ''
cntr = 1
Endif
cntr=cntr+1
Endscan
@ prow()+2,5 say '_________________________________________________________________________________________________________'
@ prow()+2,100 say 'Total :'
@ prow(),126-LEN(ALLTRIM(STR(mnt))) say transform(mnt,'9,999,999.99')
Else
Messagebox("Printer Not Ready",64+4,"Message")
Endif
Set printer to default
Set DEVICE TO screen



Thanks and More Power to the Fox
Next
Reply
Map
View

Click here to load this message in the networking platform