Expande(oRs:RutaArchivo, dFecha, whoraini, whorafin)
RETURN
FUNCTION Expande
Local cDato
PARAMETERS c, dFecha, whoraini, whorafin
cDato:= &c
RETURN cDato
#include 'fivewin.ch'
FUNCTION test
LOCAL RutaInforme, whoraini, whorafin, dfecha, warchiv
dfecha := Date()
whoraini :='13:00:00'
whorafin :='13:59:59'
RutaInforme := '"inf1_" + Dtos( dFecha ) + "-" + Substr( whoraini, 1, 2 ) + Substr(whoraini, 4, 2 ) + "-" + Substr( whorafin, 1, 2 ) + Substr(whorafin, 4, 2 ) + ".xlsx"'
warchiv := &Rutainforme
RETURN nil
Application
===========
Path and name: D:\XBASE-PROYECTOS\EJEMPLO\SOURCE\EJEMPLO.exe (32 bits)
Size: 4,871,168 bytes
Compiler version: Harbour 3.2.0dev (r2104281802)
FiveWin version: FWH 22.10
C compiler version: Borland/Embarcadero C++ 7.0 (32-bit)
Windows 10 64 Bits, version: 6.2, Build 9200
Time from start: 0 hours 0 mins 0 secs
Error occurred at: 10/03/23, 10:08:40
Error description: Error BASE/1003 Variable does not exist: DFECHA
Stack Calls
===========
Called from: d:\xbase-proyectos\ejemplo\source\EJEMPLO.prg => TEST( 10 )
System
======
CPU type: Intel(R) Core(TM) i5-6400T CPU @ 2.20GHz 2208 Mhz
Hardware memory: 12063 megs
Free System resources: 90 %
GDI resources: 90 %
User resources: 90 %
Windows total applications running: 3
1 ,
2 , D:\XBASE-PROYECTOS\EJEMPLO\SOURCE\EJEMPLO.exe
RutaInforme := "inf1_" + Dtos( dFecha ) + "-" + Substr( whoraini, 1, 2 ) + Substr(whoraini, 4, 2 ) + "-" + Substr( whorafin, 1, 2 ) + Substr(whorafin, 4, 2 ) + ".xlsx"
no creo que sea necesario el uso de la macro
#include 'fivewin.ch'
FUNCTION test()
LOCAL whoraini, whorafin, dfecha, warchiv, oRs
FWCONNECT oCn HOST 'localhost' USER 'root' PASSWORD 'Sys' PORT 3306 DB 'prueba'
oRs:=oCn:Rowset( 'Informes' )
dfecha := Date()
whoraini :='13:00:00'
whorafin :='13:59:59'
RutaInforme := Alltrim( oRs:RutaInforme )
warchiv := &RutaInforme //linea 14
RETURN nil
Application
===========
Path and name: D:\XBASE-PROYECTOS\EJEMPLO\ejemplo.exe (32 bits)
Size: 5,065,728 bytes
Compiler version: Harbour 3.2.0dev (r2104281802)
FiveWin version: FWH 22.10
C compiler version: Borland/Embarcadero C++ 7.0 (32-bit)
Windows 10 64 Bits, version: 6.2, Build 9200
Time from start: 0 hours 0 mins 0 secs
Error occurred at: 10/03/23, 12:15:17
Error description: Error BASE/1003 Variable does not exist: DFECHA
Stack Calls
===========
Called from: d:\xbase-proyectos\ejemplo\source\EJEMPLO.prg => TEST( 14 )
System
======
CPU type: Intel(R) Core(TM) i5-6400T CPU @ 2.20GHz 2208 Mhz
Hardware memory: 12063 megs
Free System resources: 90 %
GDI resources: 90 %
User resources: 90 %
Windows total applications running: 3
1 ,
2 , D:\XBASE-PROYECTOS\EJEMPLO\ejemplo.exe
RutaInforme := "inf1_" + Dtos( dfecha ) + "-" + Substr( whoraini, 1, 2 ) + Substr(whoraini, 4, 2 ) + "-" + Substr( whorafin, 1, 2 ) + Substr(whorafin, 4, 2 ) + ".xlsx"
warchiv := RutaInforme
#include 'fivewin.ch'
FUNCTION test()
LOCAL whoraini, whorafin, dfecha, warchiv, oRs
FWCONNECT oCn HOST 'localhost' USER 'root' PASSWORD 'Sys' PORT 3306 DB 'prueba'
oRs:=oCn:Rowset( 'Informes' )
dfecha := Date()
whoraini :='13:00:00'
whorafin :='13:59:59'
RutaInforme := Alltrim( oRs:RutaInforme )
blk := '{|dfecha, whoraini, whorafin| ' + RutaInforme + ' }'
warchiv := Eval( &blk, dfecha, whoraini, whorafin )
?warchiv
RETURN nil
Return to FiveWin para Harbour/xHarbour
Users browsing this forum: No registered users and 32 guests