Bug Exportar Excel en Report

Post Reply
MOISES
Posts: 824
Joined: Wed Aug 22, 2007 10:09 am

Bug Exportar Excel en Report

Post by MOISES »

Hola:

En samples\report.prg, al hacer el preview del Report el botón de exportar a Excel está inactivo y no funciona.

En la FW 14.14 todo OK, en rpreview.prg el valor oReport no llega bien ahora, y por eso no exporta:

Code: Select all

ACCESS CanExportToExcel INLINE If( ::oReport == nil, ::oDevice:bToExcel != nil, ;
                                  ( ::oReport:bInit != nil .or. ::oReport:bToExcel != nil ) )
 
Gracias.
Saludos / Regards,

FWH 20.04, Harbour 3.2.0 dev (r1909261630) y BCC 7.40
User avatar
cnavarro
Posts: 5792
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Bug Exportar Excel en Report

Post by cnavarro »

Prueba este ejemplo desde la carpeta samples con el buildh.bat

http://forums.fivetechsupport.com/viewt ... el#p222836
C. Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
Si alguien te dice que algo no se puede hacer, recuerda que esta hablando de sus limitaciones, no de las tuyas.
MOISES
Posts: 824
Joined: Wed Aug 22, 2007 10:09 am

Re: Bug Exportar Excel en Report

Post by MOISES »

Tampoco funciona.
Saludos / Regards,

FWH 20.04, Harbour 3.2.0 dev (r1909261630) y BCC 7.40
EASYSOFT
Posts: 129
Joined: Sat Oct 22, 2005 1:17 pm
Location: Quito - Ecuador

Re: Bug Exportar Excel en Report

Post by EASYSOFT »

Moises

Buenas tardes, posiblemente falte esta instrucción
oReport:bInit := { || dbGoTop() }

Saludos

_
Saludos
_
Fwh 10.4, bcc55
EASYSOFT
Posts: 129
Joined: Sat Oct 22, 2005 1:17 pm
Location: Quito - Ecuador

Re: Bug Exportar Excel en Report

Post by EASYSOFT »

Me falta decir que yo lo tengo al inicio del reporte

PREVIEW // TO PRINTER
oReport:oDevice:SetPage(15)
oReport:bInit := { || dbGoTop() }

Saludos
_
Saludos
_
Fwh 10.4, bcc55
MOISES
Posts: 824
Joined: Wed Aug 22, 2007 10:09 am

Re: Bug Exportar Excel en Report

Post by MOISES »

Sí, ya lo tengo puesto. Antes con FW 14.14 funciona bien.

Este es el código:

Code: Select all

    #include "fivewin.ch"
    #include "report.ch"

    REQUEST DBFCDX

    function Main()

      local oRep, oFont

       USE CUSTOMER NEW SHARED VIA "DBFCDX"
       SET FILTER TO RECNO() <= 20
       GO TOP

       DEFINE FONT oFont NAME "TAHOMA"  SIZE 0,-12
       REPORT oRep PREVIEW FONT oFont

oRep:bInit := { || dbGoTop() }


       COLUMN TITLE "NAME" DATA FIELD->FIRST
       COLUMN TITLE "CITY" DATA FIELD->CITY

       ENDREPORT

       oRep:bInit := { || CUSTOMER->( DBGOTOP() ) }

       ACTIVATE REPORT oRep

       RELEASE FONT oFont

    return nil
 
Saludos / Regards,

FWH 20.04, Harbour 3.2.0 dev (r1909261630) y BCC 7.40
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: Bug Exportar Excel en Report

Post by nageswaragunupudi »

MOISES wrote:Hola:

En samples\report.prg, al hacer el preview del Report el botón de exportar a Excel está inactivo y no funciona.

En la FW 14.14 todo OK, en rpreview.prg el valor oReport no llega bien ahora, y por eso no exporta:

Code: Select all

ACCESS CanExportToExcel INLINE If( ::oReport == nil, ::oDevice:bToExcel != nil, ;
                                  ( ::oReport:bInit != nil .or. ::oReport:bToExcel != nil ) )
 
Gracias.
We will look into this.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: Bug Exportar Excel en Report

Post by nageswaragunupudi »

You are right. Thanks for pointing this out.

This is a bug introduced in FWH1909 and effects this version only.
Fixed in the next version to be released.

Till then, please apply this fix by modifying report.prg

In the METHOD Activate() of TReport class in report.prg, please locate these lines 912 to 923

Code: Select all

      ACTIVATE DIALOG ::oRptWnd CENTERED
/*
      if Empty( ::oDevice:cFile )
         Eval( ::bPreview, ::oDevice )

      elseif "pdf" $ Lower( ::oDevice:cFile )
         FWSavePreviewToPDF( ::oDevice,;
               If( Lower( cFileExt( ::oDevice:cFile ) ) == "pdf", ;
               ::oDevice:cFile, nil ), ::oDevice:lPreview )
      endif
*/
      PrintEnd()
 
Please change these lines as:

Code: Select all

      ACTIVATE DIALOG ::oRptWnd CENTERED

      if Empty( ::oDevice:cFile )
         Eval( ::bPreview, ::oDevice )
      else
         PrintEnd()
      endif
 
Please test after this change and let us know.
Regards

G. N. Rao.
Hyderabad, India
MOISES
Posts: 824
Joined: Wed Aug 22, 2007 10:09 am

Re: Bug Exportar Excel en Report

Post by MOISES »

Yes, the fix works perfect.

When do you plan to reléase a new build?
Saludos / Regards,

FWH 20.04, Harbour 3.2.0 dev (r1909261630) y BCC 7.40
User avatar
Sistem
Posts: 224
Joined: Sun May 13, 2012 7:52 am

Re: Bug Exportar Excel en Report

Post by Sistem »

estou tendo problema ao finalizar o repot

Descrição do Erro:
Error BASE/1004 Class: 'NIL' has no exported method: LMETA
[ 1] = U

chamado por LMETA(0)
chamado por PRINTEND(1766)
chamado por TREPORT:ACTIVATE(929)

alguem tem esse problema?
FWH2008 | xHarbour | BCC74 | SQLRDD
User avatar
karinha
Posts: 4882
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: Bug Exportar Excel en Report

Post by karinha »

Code: Select all

   IF DeOndePartiu = "IMPRIMEPDF"

      oPrn:lMeta = .F.  // .T.

   ENDIF
 
João Santos - São Paulo - Brasil
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: Bug Exportar Excel en Report

Post by nageswaragunupudi »

Sistem wrote:estou tendo problema ao finalizar o repot

Descrição do Erro:
Error BASE/1004 Class: 'NIL' has no exported method: LMETA
[ 1] = U

chamado por LMETA(0)
chamado por PRINTEND(1766)
chamado por TREPORT:ACTIVATE(929)

alguem tem esse problema?
Are you getting this error with FWH1903?
Or FWH1909?
If FWH1909, did you make the correction I posted above?

Can you also post your code, how you defined the REPORT?

Your answers will help us to find if there are any bugs and fix them if required.
Regards

G. N. Rao.
Hyderabad, India
Post Reply