...::: SPANISH :::...
Estimado Roberto:
Cómo puedo ejecutar un reporte pero pasándole el nombre del .RMG como una variable?
Lo he intentado así:
cRptaEjecutar := 'pepe'
USE clientes
LOAD REPORT &(cRptaEjecutar)
EXECUTE REPORT &(cRptaEjecutar) PREVIEW SELECTPRINTER
pero me dá error cuando compilo.
...::: ENGLISH :::...
Dear Robert:
How can I run a report but passing it the name. RMG as a variable?
I tried this:
cRptaEjecutar: = 'pepe'
USE clientes
LOAD REPORT & (cRptaEjecutar)
EXECUTE REPORT & (cRptaEjecutar) SELECTPRINTER PREVIEW
but it gives me error when I compile.
EXECUTE REPORT
Moderator: Rathinagiri
EXECUTE REPORT
Saludos, Fernando Chirico.
- Roberto Lopez
- HMG Founder
- Posts: 4023
- Joined: Wed Jul 30, 2008 6:43 pm
Re: EXECUTE REPORT
You can use the ExecuteReport function:fchirico wrote:...::: SPANISH :::...
Estimado Roberto:
Cómo puedo ejecutar un reporte pero pasándole el nombre del .RMG como una variable?
Lo he intentado así:
cRptaEjecutar := 'pepe'
USE clientes
LOAD REPORT &(cRptaEjecutar)
EXECUTE REPORT &(cRptaEjecutar) PREVIEW SELECTPRINTER
pero me dá error cuando compilo.
...::: ENGLISH :::...
Dear Robert:
How can I run a report but passing it the name. RMG as a variable?
I tried this:
cRptaEjecutar: = 'pepe'
USE clientes
LOAD REPORT & (cRptaEjecutar)
EXECUTE REPORT & (cRptaEjecutar) SELECTPRINTER PREVIEW
but it gives me error when I compile.
Code: Select all
ExecuteReport ( cReportName , lPreview , lSelect , cOutputFileName )Regards/Saludos,
Roberto
(Veritas Filia Temporis)
Roberto
(Veritas Filia Temporis)
Re: EXECUTE REPORT
True, sometimes the tree will not let you see the forest.Roberto Lopez wrote:You can use the ExecuteReport function:
Code: Select all
ExecuteReport ( cReportName , lPreview , lSelect , cOutputFileName )
Thank you!
Saludos, Fernando Chirico.
Re: EXECUTE REPORT
...::: SPANISH :::...fchirico wrote:True, sometimes the tree will not let you see the forest.Roberto Lopez wrote:You can use the ExecuteReport function:
Code: Select all
ExecuteReport ( cReportName , lPreview , lSelect , cOutputFileName )
Thank you!
Roberto,
La función ExecuteReport() funcionó perfecto, el problema lo tengo cuando hago el LOAD REPORT.
La idea es ejecutar los RMG desde un menú. En un ListBox tengo los nombres de los RMG cargados y al hacer DobleClick ejecutar ese reporte, por ese motivo necesito cargarlos ( LOAD REPORT ) y luego ejecutarlos ( con el ExecuteReport() que funciona correctamente) .
Entonces... cómo puedo cargar un reporte pasándole el nombre como variable?
Muchas gracias!
...::: ENGLISH :::...
Roberto,
ExecuteReport function () worked perfectly, the problem I have when I do the LOAD REPORT.
The idea is to run the RMG from a menu. In a ListBox I have the names of the RMG loaded and run by double-clicking that report, that is why I need to load (LOAD REPORT) and then run (with ExecuteReport () to work correctly).
Then ... how can I load a report by passing the name as variable?
Thank you very much!
Saludos, Fernando Chirico.
- Roberto Lopez
- HMG Founder
- Posts: 4023
- Joined: Wed Jul 30, 2008 6:43 pm
Re: EXECUTE REPORT
LOAD REPORT is translated as an #include, so it is 'solved' at compile time. It can't be loaded at runtime (the same as windows).fchirico wrote:...::: SPANISH :::...fchirico wrote:True, sometimes the tree will not let you see the forest.Roberto Lopez wrote:You can use the ExecuteReport function:
Code: Select all
ExecuteReport ( cReportName , lPreview , lSelect , cOutputFileName )
Thank you!
Roberto,
La función ExecuteReport() funcionó perfecto, el problema lo tengo cuando hago el LOAD REPORT.
La idea es ejecutar los RMG desde un menú. En un ListBox tengo los nombres de los RMG cargados y al hacer DobleClick ejecutar ese reporte, por ese motivo necesito cargarlos ( LOAD REPORT ) y luego ejecutarlos ( con el ExecuteReport() que funciona correctamente) .
Entonces... cómo puedo cargar un reporte pasándole el nombre como variable?
Muchas gracias!
...::: ENGLISH :::...
Roberto,
ExecuteReport function () worked perfectly, the problem I have when I do the LOAD REPORT.
The idea is to run the RMG from a menu. In a ListBox I have the names of the RMG loaded and run by double-clicking that report, that is why I need to load (LOAD REPORT) and then run (with ExecuteReport () to work correctly).
Then ... how can I load a report by passing the name as variable?
Thank you very much!
Regards/Saludos,
Roberto
(Veritas Filia Temporis)
Roberto
(Veritas Filia Temporis)