Parameter is incorrect error in Win98
I have a program (written in Delphi v7.0, Report Builder Enterprise v7.03)
running a patient database. Everthing is compiled into the program (ie not
using packages).
One of options is to printout photographs of all the new admissions. The
photo is a quite small (Only about 2KB in size) jpeg stored in a blob field
on a DBISAM database. The Photos are printed 25 to an A4 page 5 columns per
page (5x5 matrix) and the report is between 1 and 3 pages long.
This report works fine under Windows XP but on an PC running Win98 (2nd
Edition) it will not reliably print but instead gives the error ..
"There is an error writing to LPT1: for printer (HP Deskjet 970C Series).
The parameter is incorrect"
This error occurs after the printer dialogue window and whilst the final
page is shown on the print processing display box, just before the report
starts to print. It happens whether I preview the the screen first or send
directly to the printer. The same error occurs for two different printers on
the same computer (HP Lasterjet 4 and the HP Deskjet 970C) and also occurs
on a laptop that I own that still uses Win98 2nd Edition (this time to a HP
Deskjet 895cxi).
If I have the report set to 2 passes it will not print at all. If I set it
to 1 pass then it will print the first time through but not if I immediatley
ask it to print again.
This is a rather critical problem for my customer. Has anyone any ideas on
how I can correct this problem?
Many thanks,
Ian
running a patient database. Everthing is compiled into the program (ie not
using packages).
One of options is to printout photographs of all the new admissions. The
photo is a quite small (Only about 2KB in size) jpeg stored in a blob field
on a DBISAM database. The Photos are printed 25 to an A4 page 5 columns per
page (5x5 matrix) and the report is between 1 and 3 pages long.
This report works fine under Windows XP but on an PC running Win98 (2nd
Edition) it will not reliably print but instead gives the error ..
"There is an error writing to LPT1: for printer (HP Deskjet 970C Series).
The parameter is incorrect"
This error occurs after the printer dialogue window and whilst the final
page is shown on the print processing display box, just before the report
starts to print. It happens whether I preview the the screen first or send
directly to the printer. The same error occurs for two different printers on
the same computer (HP Lasterjet 4 and the HP Deskjet 970C) and also occurs
on a laptop that I own that still uses Win98 2nd Edition (this time to a HP
Deskjet 895cxi).
If I have the report set to 2 passes it will not print at all. If I set it
to 1 pass then it will print the first time through but not if I immediatley
ask it to print again.
This is a rather critical problem for my customer. Has anyone any ideas on
how I can correct this problem?
Many thanks,
Ian
This discussion has been closed.
Comments
report to the 1-pass option did not solve the problem. The report produces
the error for both 2 pass and 1 pass option.
Ian
If the report prints fine in Windows XP and not in Windows 98, it is most
likely a printer driver issue. Have your customer download the latest
drivers for the printer they are using and re-run the report. Also, Windows
98 has not been known to handle resource and memory leaks very well. Be
sure your application does not have any resource leaks by perhaps running a
memory check on it.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
computers; the customers and one of mine. The customer has two printers (HP
Deskjet 970c and HP Laserjet 4) connected to their computer on separate
parallel ports. Both printers have the most up-to-date drivers loaded.
My computer is using yet another different printer (HP Deskjet 895cxi). That
also has the latest drivers installed.
I can take either of the computers, boot it up from cold, startup my
program, go straight the report, try to print it and it gives the same
error.
I am not sure what I am supposed to be looking for here?!?
It seems to me that your print routines are not handling this report with
multiple jpegs photographs very well under win98!
How do I run a memory check on it?
Ian
ReportBuilder used the exact same API calls to communicate with the
connected printer driver in Windows 98 that it used in Windows XP. The only
difference is the printer driver. Unfortunately the Windows 98 memory
management is not as advanced as Windows 2000 or XP so problems are very
common.
1. Are you able to print any reports on these printers? For instance if you
place a report on a form with a single label in the header band, can you
print?
2. There is be a patch available that could help with the problem if it only
happens when images are in your report. Please send a small email
requesting the "image patch" to support@digital-metaphors.com and we'll send
it right out to you.
3. A good free memory checker for Delphi is MemCheck. It is always a good
idea to run a memory checker on your applications to be sure no memory or
resources are being leaked during or after execution.
http://v.mahon.free.fr/pro/freeware/memcheck/
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
about 2 years. It has ~ 12 Report Builder reports included and two of these
have images on them in the same 5x5 matrix. This problem only occurs on the
two with the images on them. All of the other reports work without problem.
Even the one that currently runs to 700+ pages! ... I don't think they ever
print that one out now.
Apparrently the error has occurred from time to time throughout those two
years but the customer never thought to mention it to me!
A couple of weeks ago I upgraded the software to use DBISAM rather than the
BDE. This increased the size of the EXE considerably. Now, rather than the
error happening occasionally, it happens every time. But still only to the
two reports with the images in.
I have emailed support for the patch that you referred to. I will let you
know how that progresses. I am also looking at using packages to see if that
resolves the problem.
Thanks for the reference to MemCheck; that looks most useful.
Many thanks,
Ian
Just installed the amended software at the customers today. The patch below
has solved the problem.
Many thanks,
Ian