>Hi All,
>
>I've got an networked app that runs a report after a editform (user configurable). When a user selects to print the report, it takes a long time (aprox 12 seconds) before the report gets printed. I've set the tmpfiles to a local disk. this does not help. does anyone have the same problem? or does anyone has a possible solution?
>
When printing to a network printer, there are at least two layers of spooler involved - one at the workstation, and another at the print server. In the case of printers accessed via the old CAPTURE command, the print spooler at the server might be set not to start printing spooled output until some fixed period of time had passed (the TI= parameter in the old CAPTURE statement.)
Start by checking the Windows printer configuration on the workstation in question - see if the spool option allows the printing to start before the spooler closes the output. If not, there's one thing that will make a difference. If it waits to send to the network print queue until after the print job completes, thereport has to finish, and then the queued output in its entirety sent to the print server, before output starts.
Realize that the network printer can't start printing your print job until after the spooler connection from the workstation to the server is closed - otherwise, the print server can't be sure when one job is finished so it can start working on something else that's queued up.
Windows can be finicky about recognizing the end of a print job - issuing a SET PRINTER TO immediately after running the report might help.
Finally, some printers go into a suspend state when a certain period of inactivity goes by as a power saving measure - the Brother HR-600 family has an annoyingly long delay while it 'warms up' after not printing anything for 5-10 minutes.
You may find that printing to a file and then queuing the print file gives better performance, or copying the file to the network printer using the Win32 API - I posted a FAQ entry on how to send a file directly to a print port or a print queue by its UNC here on UT. I use this extensively - it lets me print a report to file and then go back and reprint it 'on demand' later, or email it for printing at a remote site (be careful doing this if your sites don't use the same types of printers, since the formatting for different printers may not be compatible, even in the same family of printers. If you have this problem, print to the 'least common denominator' printer driver - the output for an HP 5si which uses PCL version 5 may not work on a PCL 3 compatible printer; OTOH, any HP compatible will accept stuff formatted for a LaserJet Series 2...