Consultor Eletrônico



Kbase P47370: peSelectPrinter API call difference between Crystal V8 and C
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   1/20/2004
Status: Unverified

FACT(s) (Environment):

Progress V8.x

FACT(s) (Environment):

Progress V9.x

SYMPTOM(s):

peSelectPrinter API call difference between Crystal V8 and Crystal V9.

Crystal Report Error 707 with CRPE32.DLL

CHANGE:

Customer upgraded to Crystal Report V9.

CAUSE:

There is a change on the way you will use the call to the API Function peSelectPrinter contained in CRPE32.DLL between Crystal V8 and Crystal V9.

In V8 Crystal is expecting as parameter for peSelectPrinter is the printer name
In V9 Crystal is expecting as parameter for peSelectPrinter is two extra characters (CHR(14)) and

FIX:

You will need to adapt your code for testing the Crystal Version and depending on the Crystal Version you will sent to peSelectPrinter one value or the other.

In Example:
To get the Crystal Version.
/* Querying Version */
run PeGetVersion ( input 100, output iVersionDLLCrystal ).
   If iVersionDLLCrystal = 0 Then iVersionDLLCrystal = 0.
   Else do:
         major = iVersionDLLCrystal / 256.
         minor = iVersionDLLCrystal Modulo 256.
         iVersionDLLCrystal = major + (minor / 10).
   End.

/* Once we have the Crystal Version */
Code to be received soon