>>Hi All:
>>
>>I'm still working on my Clipper to VFP conversion.
>>
>>Problem:
>>
>>I'm printing a text file by appending it into a cursor. I then print the a report from the cursor to the Generic / Text only printer. The font I'm using is HVTerminal, which is a font that prints those funny characters as lines, which I want.
>>
>>BUT, the report looks totally different on my client's machine, even though I have the same Generic / Text Only printer installed on both machines.
>>
>>I'm saving the printer environment in the report.
>>
>>Thanks,
>>
>>Yossi
>
>One option is to send the characters to the printer, via code. My download #
9991 assists you with this task - but be warned that you can't use the existing (FRX) reports, you have to program from scratch.
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