>Hilmar:
>
>I have since solved the above problem, but I still have a problem, as I'll now describe:
>
>The Clipper program which I'm working with, which was designed for DOS, prints to the DOS printer thus:
>
>
>set device to printer
>@ 0,1 say ' '
>llFirstTime = .t.
>use SomeTable
>Do while !eof()
> If llFirstTime
> Do PrintHeader
> llFirstTime = .f.
> endif
> If prow() > 55
> do Printerfooter
> @ prow() + 1 say Field1 + ' ' + field2
> skip
>enddo
>
>set device to screen
>
>return
>
>proc printheader
>
>@ 0,1 say wierd characters that resolve to nice lines in the DOS world
>
>return
>
>
>To get around the wierd characters, I bought HVTerminal fonts from a company in Australia, created an FRX file that has one field in it with the HVTerminal font, and changed the above program to SET DEVICE to file joe.txt.
>
>I then execute the following code:
>
>
>SET DEVICE TO SCREEN
>
>CREATE CURSOR joeCursor ;
> (cDetail c(250))
>
>APPEND FROM joe.txt TYPE SDF
>
>IF RECCOUNT() > 0
> REPORT FORM joetest NOCONSOLE PREVIEW
>ENDIF
>
>
>
>The problem that I still have:
>
>1. In order to make the page eject, I need a routine to print a bunch of blank lines until the page ejects, since printing EJECT to the file doesn't accomplish this, but this seems to be PRINTER SPECIFIC. How do I get around this? This needs to work with multiple printers.
>
>2. If I don't save the printer environment, how would that help? How would the report work with all printers?
>
>I hope I explained myself properly.
>
>Thanks,
>
>Yossi
To make a report print as in DOS, I would create a text file and then print the entire file with the command "???", thusly:
lcPrinterSetupCodes = ...
lcFileInRam = FileToStr("FileOnDisk.txt")
??? lcPrinterSetupCodes + lcFileInRam
My reporting class does something similar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)