Hi Cyrus,
You need to abandon the old way of printing in FP DOS.
I just took on a project where they have some 200+ reports (none of which were written with the report writer and all of which were sending formatting codes directly to the printer -Eeeeeek!).
Basically, what I did was:
1) Re-Direct the output to a temp file.
set device to FILE(GETENV("TEMP")+'\prtemp.txt')
2) STRTRAN the page end marker to a CSS2 PAGEBREAK style
set device to screen
m.junk=FILETOSTR(GETENV('TEMP')+'\prtemp.txt')
m.junk=STRTRAN(m.duh,CHR(12),CHR(13)+'<DIV CLASS="PAGEBREAK"></DIV>'+CHR(13))
3) I then sucked the text file into an HTML wrapper and instanced a browser object to preview/print the report.
It worked like a charm!
Thank God! I didn't have to rewrite those reports. I would have gone literally nuts!!!
Good luck!!
If you want the details, let me know.
Hugh
Microsoft hears loudest what the VFP community says about Visual FoxPro by looking at the bottom line!
Support the product. Buy the latest version!
Hugh Winters @ WorldData 408-512-1131