EXECUTE REPORT

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
User avatar
fchirico
Posts: 324
Joined: Sat Aug 23, 2008 11:27 pm
Location: Argentina

EXECUTE REPORT

Post by fchirico »

...::: 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.
Saludos, Fernando Chirico.
User avatar
Roberto Lopez
HMG Founder
Posts: 4023
Joined: Wed Jul 30, 2008 6:43 pm

Re: EXECUTE REPORT

Post by Roberto Lopez »

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.
You can use the ExecuteReport function:

Code: Select all

ExecuteReport ( cReportName , lPreview , lSelect , cOutputFileName )
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
fchirico
Posts: 324
Joined: Sat Aug 23, 2008 11:27 pm
Location: Argentina

Re: EXECUTE REPORT

Post by fchirico »

Roberto Lopez wrote:You can use the ExecuteReport function:

Code: Select all

ExecuteReport ( cReportName , lPreview , lSelect , cOutputFileName )
True, sometimes the tree will not let you see the forest.

Thank you!
Saludos, Fernando Chirico.
User avatar
fchirico
Posts: 324
Joined: Sat Aug 23, 2008 11:27 pm
Location: Argentina

Re: EXECUTE REPORT

Post by fchirico »

fchirico wrote:
Roberto Lopez wrote:You can use the ExecuteReport function:

Code: Select all

ExecuteReport ( cReportName , lPreview , lSelect , cOutputFileName )
True, sometimes the tree will not let you see the forest.

Thank you!
...::: SPANISH :::...
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.
User avatar
Roberto Lopez
HMG Founder
Posts: 4023
Joined: Wed Jul 30, 2008 6:43 pm

Re: EXECUTE REPORT

Post by Roberto Lopez »

fchirico wrote:
fchirico wrote:
Roberto Lopez wrote:You can use the ExecuteReport function:

Code: Select all

ExecuteReport ( cReportName , lPreview , lSelect , cOutputFileName )
True, sometimes the tree will not let you see the forest.

Thank you!
...::: SPANISH :::...
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!
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).
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
Post Reply