Page 1 of 1
Problemas con Easy Report FWH2210 - SOLUCIONADO
Posted: Wed Dec 14, 2022 12:53 am
by leandro
Hola buenas noches
Al intentar compilar el ejemplo erep01.prg con la versión FWH2210 y xharbour, sale el siguiente error:
Tambien sale el mismo error cuando generamos un reporte con Easy Report en la aplicación en producción.
Code: Select all | Expand
Application
===========
Path and name: C:\fwh2210\samples\erep01.exe (32 bits)
Size: 4,224,000 bytes
Compiler version: xHarbour 1.2.3 Intl. (SimpLex) (Build 20221118)
FiveWin version: FWH 22.10
C compiler version: Borland/Embarcadero C++ 7.4 (32-bit)
Windows 11 64 Bits, version: 6.2, Build 9200
Time from start: 0 hours 0 mins 1 secs
Error occurred at: 12/13/22, 19:51:55
Error description: Error BASE/1089 Argument error: ABS
Args:
[ 1] = P 0x76460000
Stack Calls
===========
Called from: => ABS( 0 )
Called from: .\source\classes\ESREPORT.PRG => GETPPSECTION( 0 )
Called from: .\source\classes\ESREPORT.PRG => GETINISECTION( 2653 )
Called from: .\source\classes\ESREPORT.PRG => FW_EREPORT:NEW( 256 )
Called from: erep01.prg => DRUCKLISTE( 91 )
Called from: erep01.prg => (b)MAIN( 39 )
Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:CLICK( 792 )
Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:LBUTTONUP( 1083 )
Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1847 )
Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:HANDLEEVENT( 2135 )
Called from: .\source\classes\WINDOW.PRG => _FWH( 3689 )
Called from: => DIALOGBOXINDIRECT( 0 )
Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE( 307 )
Called from: erep01.prg => MAIN( 68 )
Re: Problemas con Easy Report FWH2210
Posted: Wed Dec 14, 2022 8:38 am
by Antonio Linares
Estimado Leandro,
Por alguna razón, LoadLibrary() de xHarbour se está usando en vez de LoadLibrary() de FWH
LoadLibrary() de xHarbour devuelve un valor tipo "P" y cuando le aplicamos Abs() se genera el error
Asegúrate de que esreport.prg este compilado usando DLL FUNCTION y no DLL32 FUNCTION y comprueba que en FWH dll.ch
esten estas líneas:
Code: Select all | Expand
#xcommand DLL [<static:STATIC>] FUNCTION <FuncName>( [ <uParam1> AS <type1> ] ;
[, <uParamN> AS <typeN> ] ) ;
AS <return> [<pascal:PASCAL>] [ FROM <SymName> ] LIB <*DllName*> ;
=> ;
[<static>] function <FuncName>( [NOREF(<uParam1>)] [,NOREF(<uParamN>)] ) ;;
local _hDLL := If( ValType( <DllName> ) == "N", <DllName>, LoadLibrary( <(DllName)> ) ) ;;
local uResult ;;
local cFarProc ;;
local _pOld ;;
if ValType( _hDLL ) == "P" ;;
_pOld = _hDLL ;;
_hDLL = PtrToNum( _hDLL ) ;;
end ;;
if Abs( _hDLL ) > 32 ;;
cFarProc = GetProcAdd( _hDLL,;
If( [ Empty( <SymName> ) == ] .t., <(FuncName)>, <SymName> ),;
[<.pascal.>], <return> [,<type1>] [,<typeN>] ) ;;
uResult = FWCallDLL( cFarProc [,<uParam1>] [,<uParamN>] ) ;;
if ! Empty( _pOld ) ;;
_hDLL = _pOld ;;
end ;;
If( ValType( <DllName> ) == "N",, FreeLibrary( _hDLL ) ) ;;
else ;;
MsgAlert( "Error code: " + LTrim( Str( _hDLL ) ) + " loading " + ;
If( ValType( <DllName> ) == "C", <DllName>, Str( <DllName> ) ) ) ;;
end ;;
return uResult
Nuestro error de no haberlo aplicado a DLL32 FUNCTION también. Vamos a implementarlo
Gracias por tu valioso feedback!
Re: Problemas con Easy Report FWH2210
Posted: Wed Dec 14, 2022 8:49 am
by Antonio Linares
Leandro,
Por favor usa este dll.ch y recompila esreport.prg y verifica si con este cambio ya te funciona bien, muchas gracias!
Code: Select all | Expand
// Copyright FiveTech 1993-2022
#ifndef _DLL_CH
#define _DLL_CH
#ifndef _C_TYPES
#define _C_TYPES
#define VOID 0
#define BYTE 1
#define CHAR 2
#define WORD 3
#ifdef __CLIPPER__
#define _INT 4 // conflicts with Clipper Int()
#else
#define _INT 7
#endif
#define BOOL 5
#define HDC 6
#define LONG 7
#define STRING 8
#define LPSTR 9
#define PTR 10
#define _DOUBLE 11 // conflicts with BORDER DOUBLE
#define DWORD 12
#define LONGLONG 13
#endif
#translate NOREF([@]<x>) => <x>
#ifndef __HARBOUR__
#ifndef __XPP__
#ifndef __CLIPPER__
#ifndef __C3__
#define __CLIPPER__
#endif
#endif
#endif
#endif
#ifndef __CLIPPER__
#translate DLL32 => DLL
#endif
//----------------------------------------------------------------------------//
#xcommand DLL [<static:STATIC>] FUNCTION <FuncName>( [ <uParam1> AS <type1> ] ;
[, <uParamN> AS <typeN> ] ) ;
AS <return> [<pascal:PASCAL>] [ FROM <SymName> ] LIB <*DllName*> ;
=> ;
[<static>] function <FuncName>( [NOREF(<uParam1>)] [,NOREF(<uParamN>)] ) ;;
local _hDLL := If( ValType( <DllName> ) == "N", <DllName>, LoadLibrary( <(DllName)> ) ) ;;
local uResult ;;
local cFarProc ;;
local _pOld ;;
if ValType( _hDLL ) == "P" ;;
_pOld = _hDLL ;;
_hDLL = PtrToNum( _hDLL ) ;;
end ;;
if Abs( _hDLL ) > 32 ;;
cFarProc = GetProcAdd( _hDLL,;
If( [ Empty( <SymName> ) == ] .t., <(FuncName)>, <SymName> ),;
[<.pascal.>], <return> [,<type1>] [,<typeN>] ) ;;
uResult = FWCallDLL( cFarProc [,<uParam1>] [,<uParamN>] ) ;;
if ! Empty( _pOld ) ;;
_hDLL = _pOld ;;
end ;;
If( ValType( <DllName> ) == "N",, FreeLibrary( _hDLL ) ) ;;
else ;;
MsgAlert( "Error code: " + LTrim( Str( _hDLL ) ) + " loading " + ;
If( ValType( <DllName> ) == "C", <DllName>, Str( <DllName> ) ) ) ;;
end ;;
return uResult
//----------------------------------------------------------------------------//
#xcommand DLL32 [<static:STATIC>] FUNCTION <FuncName>( [ <uParam1> AS <type1> ] ;
[, <uParamN> AS <typeN> ] ) ;
AS <return> [<pascal:PASCAL>] [ FROM <SymName> ] LIB <*DllName*> ;
=> ;
[<static>] function <FuncName>( [NOREF(<uParam1>)] [,NOREF(<uParamN>)] ) ;;
local _hDLL := If( ValType( <DllName> ) == "N", <DllName>, LoadLib32( <(DllName)> ) ) ;;
local uResult ;;
local cFarProc ;;
local _pOld ;;
if ValType( _hDLL ) == "P" ;;
_pOld = _hDLL ;;
_hDLL = PtrToNum( _hDLL ) ;;
end ;;
if Abs( _hDLL ) > 32 ;;
cFarProc = GetProcAdd32( _hDLL,;
If( [ Empty( <SymName> ) == ] .t., <(FuncName)>, <SymName> ),;
[<.pascal.>], <return> [,<type1>] [,<typeN>] ) ;;
uResult = FWCallDLL32( cFarProc [,<uParam1>] [,<uParamN>] ) ;;
if ! Empty( _pOld ) ;;
_hDLL = _pOld ;;
end ;;
If( ValType( <DllName> ) == "N",, FreeLib32( _hDLL ) ) ;;
else ;;
MsgAlert( "Error code: " + LTrim( Str( _hDLL ) ) + " loading " + ;
If( ValType( <DllName> ) == "C", <DllName>, Str( <DllName> ) ) ) ;;
end ;;
return uResult
//----------------------------------------------------------------------------//
Re: Problemas con Easy Report FWH2210
Posted: Wed Dec 14, 2022 9:15 am
by Antonio Linares
Probado aqui y funcionando correctamente.
Si no te funcionase, avísame y te envío las librerias mas recientes
Re: Problemas con Easy Report FWH2210
Posted: Wed Dec 14, 2022 10:01 am
by leandro
Antonio, gracias nuevamente por responder
Creo que si voy a necesitar las librerías, por que ya hice el cambio en dll.ch y el error continua.
Re: Problemas con Easy Report FWH2210
Posted: Wed Dec 14, 2022 10:40 am
by Antonio Linares
Enviadas por email!
Re: Problemas con Easy Report FWH2210
Posted: Wed Dec 14, 2022 2:00 pm
by leandro
Re: Problemas con Easy Report FWH2210
Posted: Wed Dec 14, 2022 2:55 pm
by Antonio Linares
Reenviado a esos emails
Re: Problemas con Easy Report FWH2210
Posted: Thu Dec 15, 2022 11:05 am
by leandro
Muchas gracias Antonio
Voy a hacer varias pruebas de generación de informes, de momento parece que esta solucionado.
Re: Problemas con Easy Report FWH2210 - SOLUCIONADO
Posted: Thu Dec 15, 2022 11:31 am
by Antonio Linares
muy bien!