Dienstag, 8. Januar 2008

Rave Reports and problems with (HP) printer drivers...

I read sometimes in newsgroups about problems with Rave and printer drivers, especially HP, e.g. 2600.

The interesting thing is, that the customer can print without any problems with MS-office or other application, but with Nevrona Rave Reports there is a Division by zero exception with some drivers. An update of the driver sometimes solves the problem but not 100%.

With the following solution is a workaround available that create the reports without exceptions.

Try this and if you found another problem (or solution, of course ) in this area, write me an email.

Some programming libraries (and perhaps MS-Office?!) contain such procedure

call: Set8087CW($133f);
this disables FPU exceptions....

Normally there is some bad code (in the driver) that is changing the FPU control word to cause it to ignore some exceptions and not properly resetting it.

The default value of Default8087CW is $1332, with the following code you can check it in your pascal-code.

If (Get8087CW and $1F3F) <> $1332)
then ShowMessage(Format('CW=$%4.4x',[Get8087CW]));

To make your rave-reporting with "every" driver stable, the following code should work;

CW: Word;
CW := Get8087CW;

or the asm-way


with C++ the workaround should be the secureFPU (I’m not the C++-expert, I hope this is correct !?)

#include "float.h";
void secureFpu() { _control87(PC_64|MCW_EM,MCW_PC|MCW_EM);}

Another trick especially for HP-printer driver is setting in the application the SkipAbortProc to true:
RPDev.SkipAbortProc := true;
(you must insert the RpDevice-unit)

Now your customer can print with Rave and don't get an exception....


Dave White hat gesagt…

I've had this problem for years. My workaround was to install the postscript driver, rather than the PCL driver, onto the client's PC. I've had no problems since doing it this way; the only problem I see is when IT set up a new PC and install the PCL driver by mistake.

Anonym hat gesagt…

Plase give me your e-mail id. thomas.pfister _ @_ gmail.com this is not working.

thomas pfister hat gesagt…

firstname dot lastname at gmail.com is correct;

Carlos Alberto Solla (carlosasolla@hotmail.com) hat gesagt…

I'm having problems with the printer driver matrix Epson FX-2190. He brings a BottomWaste of 0.42cm in one Form continuous de 8.5in width x 11in height when it should bring 0, and I need to print on the last line of the form. You can change the BottomWaste?