Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

preventing page eject

Status
Not open for further replies.

vdeveloper

Programmer
Aug 5, 2000
42
IN
Hi all

I am using an invoice printing routine on a dotmatrix printer which goes like this

set printer to name "EPSON LQ-1150 ESC/P2"
set printer on
set console off

? 'Memo No : ' + cmemo

? ....

etc..

?

set printer off
set printer to

my problem is that after the last 'set printer to' the printer ejects a page which I do not want, as the next bill has to be printed at the position where the last bill ended. could someone tell me how to prevent the eject?

Thanks


 
In the windows printer driver, change the page length to a custom length-- the length of the invoice form. Because Windows allocates an entire page to each print job, it always ejects the page when a windows print job is finished (so the next print job doesn't print on top of the first job).
 
have you tried not issuing the set printer off command, since this cause the page to eject?

if you are using continous feed paper of a standard form, make sure the page is filled. but you would also have to make a custom page length so windows dosn't sence the lenght of page to do a eject.

Why not build a foxpro report, custom to fit the forms you have? Attitude is Everything
 
Thanks for the replies

This app is for a supermarket cash counter where the no of detail lines is not fixed, so I cannot use a fixed length report form. the next bill has to print where the first one has ended so the cashier can tear off the first bill and print the next one immediately. Is there any way to dynamically change the length of the form?
 
vdevelop

Yes there is a way to change the report's lenght on-the-fly. It just depends on which band of the report you want to change.
For example the detail band of a report is located at ObjCode = 4 and ObjType = 9. So if I create a blank report with CREATE REPORT and save it as is. Then use the report like a table.
Code:
USE myReport.frx 
BROWSE
You will notice the detail band (ObjCode = 4 and ObjType = 9) is set at 5000.000 height. So if you know (based on some criteria) the height required you could use:
Code:
USE myReport.frx 
LOCATE FOR ObjCode = 4  and ObjType = 9 
REPLACE HEIGHT WITH 10000.000
USE
So now you have just doubled the height of the detail band. And the same applies for the footer band which is located at ObjCode = 7 and ObjType = 9.
P.S. In order for this technique to work you have to exclude your report from your project and distribute it seperatly.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top