0

I know that this is an old topic for vfp programmers. Still, I want to ask for advices that can improve the printing time for my particular case.

I recently asked to change a report written in vfp. It use commands such as fputs, etc. The user prints this report in a dot matrix printer and of course : no problem. But the user asked for column addition and some complex calculation in the report. We tried to avoid paper size changes. So my initial solution was to rework the report using report designer, and set the page orientation to landscape. The result is so slow when printed.When I open the print queue, it even shows error - printing status!

I've tried to instal the printer driver in my local PC ( the machine where I compiled the exe) and selected this printer, both with 'save printer environment' checked and unchecked. Still the same result.

Any suggestions? Other tricks for my case are welcomed. Thanks in advance.

wong chung yie
  • 175
  • 1
  • 4
  • 14

4 Answers4

1

Sometimes, and not sure if its your case, when creating a report in VFP, it saves the printer environment based on the computer used to develop it (ie: your machine). To check, and since all reports are nothing but .DBF tables renamed, try the following. Open the report as a table

USE YourReport.frx   (you have to explicitly include the .frx extension)
BROWSE

The first line in the report is your environment information that includes paper size info, orientation and even printer information. Double click in the column "Expr". The only things you probably need in this column are

ORIENTATION=1 (or 0)

it may have other stuff and look something like DRIVER=winspool DEVICE=\some\printershare OUTPUT=IP_192.168.1.22 ORIENTATION=1 PAPERSIZE=1 SCALE=100 ASCII=0 COPIES=1 DEFAULTSOURCE=15 PRINTQUALITY=600 COLOR=2 DUPLEX=2 YRESOLUTION=600 TTOPTION=3 COLLATE=0

You can remove the rest of it. Next, close this column and tab over about 10 more columns to "Tag" and "Tag2". They are also MEMO type fields. Open them up. Remove ALL data out of these two columns... BUT ONLY FOR THE FIRST ROW!!!! If you open them, you would see more embedded stuff about the printer, just remove it completely. Do NOT do a global replace to blank for all rows as that will kill the report content... ONLY the first row.

All this being said, I can't guarantee, but it may be the culprit... but then again, doing direct output on old dot-matrix printers might actually be faster than all the fancy rendering the printer drivers are doing.

DRapp
  • 47,638
  • 12
  • 72
  • 142
0

Trying to print a report from the report designer through the windows driver to a dotmatrix printer will never be acceptably quick.

That's why they originally did the report using commands.

Your choices are either change the printer to a laser printer (probably not possible I'm guessing) or change the report back to the old style.

Swordblaster
  • 356
  • 2
  • 7
0

It's hardly difficult to print fast on a dot matrix printer with VFP reports, you should do it on a raw mode, but not on ?? or ??? way, I mean on API calls like this:

--- RawPrint VCX ---

http://www.universalthread.com/ViewPageNewDownload.aspx?ID=9556

You can use a wrapper, with kind-of "Formats" support it's a commercial software but it's worthy if you need to do a lot of reports with this kind of printer:

--- DosPrint 4 ---

http://www.victorespina.com.ve/hs/es/index.php/DOSPrint4_%28VFP%29

(disclaimer: the developer of DosPrint 4 it's a friend of mine, and I worked with him testing and supporting on the previous version DosPrint 3 on the spanish MS-VFP newsgroups and http://Portalfox.com)

Esparta Palma
  • 735
  • 5
  • 10
0

Try using the Microsoft Generic Text only print driver

Caltor
  • 2,538
  • 1
  • 27
  • 55