Problemas con Easy Report FWH2210 - SOLUCIONADO

Problemas con Easy Report FWH2210 - SOLUCIONADO

Postby leandro » Wed Dec 14, 2022 12:53 am

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 view
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 )
 


Image
Saludos
LEANDRO AREVALO
Bogotá (Colombia)
https://hymlyma.com
https://hymplus.com/
leandroalfonso111@gmail.com
leandroalfonso111@hotmail.com

[ Embarcadero C++ 7.60 for Win32 ] [ FiveWin 23.07 ] [ xHarbour 1.3.0 Intl. (SimpLex) (Build 20230914) ]
User avatar
leandro
 
Posts: 1481
Joined: Wed Oct 26, 2005 2:49 pm
Location: Colombia

Re: Problemas con Easy Report FWH2210

Postby Antonio Linares » Wed Dec 14, 2022 8:38 am

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 view
#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!
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Problemas con Easy Report FWH2210

Postby Antonio Linares » Wed Dec 14, 2022 8:49 am

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 view
// 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

//----------------------------------------------------------------------------//
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Problemas con Easy Report FWH2210

Postby Antonio Linares » Wed Dec 14, 2022 9:15 am

Probado aqui y funcionando correctamente.

Si no te funcionase, avísame y te envío las librerias mas recientes :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Problemas con Easy Report FWH2210

Postby leandro » Wed Dec 14, 2022 10:01 am

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.
Saludos
LEANDRO AREVALO
Bogotá (Colombia)
https://hymlyma.com
https://hymplus.com/
leandroalfonso111@gmail.com
leandroalfonso111@hotmail.com

[ Embarcadero C++ 7.60 for Win32 ] [ FiveWin 23.07 ] [ xHarbour 1.3.0 Intl. (SimpLex) (Build 20230914) ]
User avatar
leandro
 
Posts: 1481
Joined: Wed Oct 26, 2005 2:49 pm
Location: Colombia

Re: Problemas con Easy Report FWH2210

Postby Antonio Linares » Wed Dec 14, 2022 10:40 am

Enviadas por email! :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Problemas con Easy Report FWH2210

Postby leandro » Wed Dec 14, 2022 2:00 pm

Antonio como vas?

A que correo lo enviaste?

leandroalfonso111@hotmail.com
leandroalfonso111@gmail.com
Saludos
LEANDRO AREVALO
Bogotá (Colombia)
https://hymlyma.com
https://hymplus.com/
leandroalfonso111@gmail.com
leandroalfonso111@hotmail.com

[ Embarcadero C++ 7.60 for Win32 ] [ FiveWin 23.07 ] [ xHarbour 1.3.0 Intl. (SimpLex) (Build 20230914) ]
User avatar
leandro
 
Posts: 1481
Joined: Wed Oct 26, 2005 2:49 pm
Location: Colombia

Re: Problemas con Easy Report FWH2210

Postby Antonio Linares » Wed Dec 14, 2022 2:55 pm

Reenviado a esos emails :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Problemas con Easy Report FWH2210

Postby leandro » Thu Dec 15, 2022 11:05 am

Muchas gracias Antonio

Voy a hacer varias pruebas de generación de informes, de momento parece que esta solucionado. :D
Saludos
LEANDRO AREVALO
Bogotá (Colombia)
https://hymlyma.com
https://hymplus.com/
leandroalfonso111@gmail.com
leandroalfonso111@hotmail.com

[ Embarcadero C++ 7.60 for Win32 ] [ FiveWin 23.07 ] [ xHarbour 1.3.0 Intl. (SimpLex) (Build 20230914) ]
User avatar
leandro
 
Posts: 1481
Joined: Wed Oct 26, 2005 2:49 pm
Location: Colombia

Re: Problemas con Easy Report FWH2210 - SOLUCIONADO

Postby Antonio Linares » Thu Dec 15, 2022 11:31 am

muy bien! :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 87 guests