Page 1 of 1

Cosulta sobre Report

Posted: Mon Sep 14, 2009 9:17 pm
by jreduojeda
Hola a todos...
Estoy probando hacer reportes usando REPORT.
Lo estoy haciendo asi:

Code: Select all

// EMITO LOS REPORTES //
Function ReporteVendedores(nOpcion)

DO CASE
   CASE nOpcion=1
      _OOHG_Printlibrary:="HTMLPRINT"
   CASE nOpcion=2
      _OOHG_Printlibrary:="EXCELPRINT"
   CASE nOpcion=3
      _OOHG_Printlibrary:="PDFPRINT"
   CASE nOpcion=4
      _OOHG_Printlibrary:="HBPRINTER"
ENDCASE

SELECT VEN_VENDEDOR
GO TOP
DO REPORT FORM REPVENDEDORES

Return nil
//
El "REPVENDEDORES.RPT" lo estoy haciendo así:

Code: Select all

DEFINE REPORT TEMPLATE
   TITLE "Listado de vendedores"
   HEADERS {' ',' ',' ',' '} ,  {'Código','Nombre','Domicilio','Localidad'}
   FIELDS {'VENDEDOR','NOMBRE','DOMICILIO','LOCALIDAD'}
   WIDTHS {7,25,20,20}
   TOTALS {.F.,.F.,.F.,.F.}
   NFORMATS { , , , }
   WORKAREA VEN_VENDEDOR
   LPP 20
   CPL 100
   LMARGIN 2
   PAPERSIZE DMPAPER_A4
   PREVIEW
   SELECT
END REPORT
Me funciona Ok!

Bueno ahora quisiera sacarle más provecho a esta forma de emitir reportes.
Preguntas:
¿Cómo le cambio el FONT a los titulos y a las columnas?
¿Cómo hago el reporte horizontal o vertical?
¿Se pueden poner los RPTs dentro del MiPrograma.EXE?

Desde ya muchas gracias.
Saludos a todos, desde Argentina Esteban.

Re: Cosulta sobre Report

Posted: Fri Oct 02, 2009 1:23 pm
by jreduojeda
Puede ser que nadie use REPORT??? :?: :shock:

Re: Cosulta sobre Report

Posted: Fri Oct 02, 2009 4:17 pm
by Roberto Lopez
jreduojeda wrote:Hola a todos...
Estoy probando hacer reportes usando REPORT.
Lo estoy haciendo asi:

Code: Select all

// EMITO LOS REPORTES //
Function ReporteVendedores(nOpcion)

DO CASE
   CASE nOpcion=1
      _OOHG_Printlibrary:="HTMLPRINT"
   CASE nOpcion=2
      _OOHG_Printlibrary:="EXCELPRINT"
   CASE nOpcion=3
      _OOHG_Printlibrary:="PDFPRINT"
   CASE nOpcion=4
      _OOHG_Printlibrary:="HBPRINTER"
ENDCASE

SELECT VEN_VENDEDOR
GO TOP
DO REPORT FORM REPVENDEDORES

Return nil
//
The code you've posted is to be used with another library (OOGH) not HMG.

Regarding font, AFAIK, there is not (high level) way to change font type in DO REPORT.

Regards,

Roberto.

Re: Cosulta sobre Report

Posted: Tue Oct 06, 2009 2:42 pm
by jreduojeda
Gracias por la respuesta señor Roberto...
Cómo sería la forma de hacer un reporte con HMG?? Es decir... listar algunos campos de alguna tabla.
Desde ya muchas gracias.
Saludos, Esteban.

Re: Cosulta sobre Report

Posted: Tue Oct 06, 2009 9:57 pm
by Roberto Lopez
jreduojeda wrote:Gracias por la respuesta señor Roberto...
Cómo sería la forma de hacer un reporte con HMG?? Es decir... listar algunos campos de alguna tabla.
Desde ya muchas gracias.
Saludos, Esteban.
DO REPORT command is available in HMG too, but there is not a public variable called "_OOHG_Printlibrary".

There is a new report generator.

You can manually code the reports or generate automatically with HMG-IDE.

Please look at HMG help and samples.

Regards,

Roberto.