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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help !!! Report Form Printing v2.6a 2

Status
Not open for further replies.

Foxtech

Programmer
May 26, 2001
66
CA
Hi everyone,

Please help me how to reprint from the last line printed because my report is too long. I have to
put more papers in the pack (500 papers) and want to restart at last line printed.

thanks in advance
 
Report form myReport to file myFile.txt
copy file myFile.txt to LPT1

If print crash, edit myFile.txt,
cut already printed text and repeat copy...
 
Hi Tesar,

Thanks, but I do not want to do that manualy each time the printer crash. Do you have any
solution to do that automaticaly.

bye...
 
Hi FoxTech,
You can adapt tesars suggestion of sending to a txt File.
If the printing crashes, start th text editor with this file and ptint starting from the page where it broke to end of file... using the print options of Windows.

ramani :-9
(Subramanian.G)
FoxAcc
ramani_g@yahoo.com
LET KNOW IF THIS HELPED. ENOUGH EXPERTS ARE HERE TO HELP YOU OUT! BEST OF LUCK :)
 
Ive done this before but its kinda funky, load the report to a dbf (one line per record) use scan endscan to print the report. count the number of pages ejected and when you reach about 450 pages prompt the user in refill the paper tray.

good luck
 
Thanks again for helping me.

Hi infinitelo,

I see that the way you did is very good but how do you count the number of pages ejected to
prompt user insert papers in the tray.

thanks in advance
 
Thats is the tricky part Usally i use around 60 lines per page but with a report generated by foxpro im not sure this will work (i use genecon printers with 64 char band so fancy print is never an issue with me).

by the way does anyone know where i can find shields for 20 year old line printers???
 
Hi Infinitelo,

Please tell me how you can load the report in the dbf and use Scan...EndScan to read the file.

thanks in advance
 
crea table myFile.dbf (print_row,C(254))
appe from myFile.txt type sdf
* you find position "Page xxx" in table
do while !("Page xxx" $ print_row)
dele
enddo
pack
copy to myFile.txt type sdf
copy file myFile.txt to LPT1
...or similarly (not tested)
 
ok this is a bit rough but here goes

table has one field as wide as your paper.
call it pages.dbf
*if you use this code send $1 to me (just kidding)

set printer to file <filename.txt>
set printer on
*report routine
set printer off
set printer to
use pages
append from <filename.txt> type sdf
printedpages = 0
scan
?pages.line
if mod(recno(),60) = 0 && page detect
eject
printedpages = printedpages+1
if printedpages = pagesinpapertray
wait &quot;need more paper&quot;
endif
endif
endscan
 
Thanks a lot, I will try and let you know guys.

ciao
 
Hi Infinitelo,

I made some tests on my HP-DeskJet 670C. It didn't print at all, the printer Ejects 2 blank pages.

I think that only print on dotmatrix printers only...

Please help me out.

thanks again


Here is my source code:

*******************************
**Print report to FILE
*******************************
procedure Printing

set printer to file c:\syscash\Invent.txt
set printer on

********************
*** Report routine
********************
set exclusive on
Report form INV noeject off to printer

set printer off
set printer to
sele 63
use printp
sele printp
delete all
pack
append from c:\syscash\Invent.txt type sdf
printpage = 0
SET DEVICE TO PRINTER
??? chr(27) + '&l1O' && Landscape mode
??? chr(27) + '(s19H' && Pitch = 19
??? chr(27) + '&l3A' && output to Tray 2
Sele printp
go top
Scan
? printp.line
If mod(recno(),45) = 0 && page detect
eject
printpage = printpage+1
If printpage = 2
printpage = 0
Wait &quot;Need more paper...&quot;
EndIf
EndIf
Loop
EndScan
??? chr(27) + '&l0O'
??? chr(27) + '(s10H'
??? chr(27) + '&l2A' && output to Tray 2

SET DEVICE TO SCREEN
set exclusive off
Return
 
Two comments:
-command EJECT is redundant,
as is included in report.
- instead SET DEVICE TO PRINTER (infuence only @) use
set printer to LPT1, to output your printer,
not former file.
 
tesar is correct, you dont need set device to printer, you need to set printer on (sorry i left that out of my example)

also check your invent.txt to see if the report went there.
(i don't use report builder and am not sure what the text file will look like) you may want to check if it has eject symbol in the report if so tesar is correct about that too. and you will need to detect that character instead of mod(recno(),45)

ive used the same type of code on a hp laser jet 6 (nice little printer) the only differnce is you have to place an extra eject after the scan endscan or the last page will get &quot;stuck&quot; in the printer's memory.

make sure talk is set to off or you will print all your varibles to the printer

note you have set printpage to 2 was that just for debugging?

also instead of dele all and pack you could use zap?


the goal of any good engineer is to have a long career where nobody gets killed by his work.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top