Bug Exportar Excel en Report

Bug Exportar Excel en Report

Postby MOISES » Sat Nov 16, 2019 2:21 pm

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  Expand view
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
MOISES
 
Posts: 838
Joined: Wed Aug 22, 2007 10:09 am

Re: Bug Exportar Excel en Report

Postby cnavarro » Sat Nov 16, 2019 3:12 pm

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

viewtopic.php?f=6&t=37293&p=222960&hilit=report+to+excel#p222836
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6541
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Bug Exportar Excel en Report

Postby MOISES » Sat Nov 16, 2019 3:21 pm

Tampoco funciona.
Saludos / Regards,

FWH 20.04, Harbour 3.2.0 dev (r1909261630) y BCC 7.40
MOISES
 
Posts: 838
Joined: Wed Aug 22, 2007 10:09 am

Re: Bug Exportar Excel en Report

Postby EASYSOFT » Sat Nov 16, 2019 5:02 pm

Moises

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

Saludos

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

Re: Bug Exportar Excel en Report

Postby EASYSOFT » Sat Nov 16, 2019 5:04 pm

Me falta decir que yo lo tengo al inicio del reporte

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

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

Re: Bug Exportar Excel en Report

Postby MOISES » Sat Nov 16, 2019 5:28 pm

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

Este es el código:

Code: Select all  Expand view
   #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
MOISES
 
Posts: 838
Joined: Wed Aug 22, 2007 10:09 am

Re: Bug Exportar Excel en Report

Postby nageswaragunupudi » Sun Nov 17, 2019 1:47 pm

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  Expand view
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: 10620
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Bug Exportar Excel en Report

Postby nageswaragunupudi » Sun Nov 17, 2019 3:08 pm

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  Expand view

      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  Expand view

      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
User avatar
nageswaragunupudi
 
Posts: 10620
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Bug Exportar Excel en Report

Postby MOISES » Sun Nov 17, 2019 5:00 pm

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
MOISES
 
Posts: 838
Joined: Wed Aug 22, 2007 10:09 am

Re: Bug Exportar Excel en Report

Postby Sistem » Fri Dec 13, 2019 3:06 pm

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
Sistem
 
Posts: 226
Joined: Sun May 13, 2012 7:52 am

Re: Bug Exportar Excel en Report

Postby karinha » Fri Dec 13, 2019 3:58 pm

Code: Select all  Expand view

   IF DeOndePartiu = "IMPRIMEPDF"

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

   ENDIF
 
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7794
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: Bug Exportar Excel en Report

Postby nageswaragunupudi » Sat Dec 14, 2019 4:21 am

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
User avatar
nageswaragunupudi
 
Posts: 10620
Joined: Sun Nov 19, 2006 5:22 am
Location: India


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 46 guests