¿Cómo activo el botón XLS del Preview?

¿Cómo activo el botón XLS del Preview?

Postby wyerco613 » Mon Jun 10, 2019 4:55 am

Estimados

Buenas noches, ¿Cómo activo el botón XLS del Preview? el de PDF y de WORD están activados y funcionan bien pero este sale "disabled". Ya me he revisado varios prg´s

inclusive FIVEDBU y no lo encontre (a propósito no permite imprimir la estructura de una tabla y tampoco modificarla, se podría implementar. Saludos )

Muchas gracias desde ya.

Waldemar
"Porque Jehová da la sabiduría , Y de su boca viene el conocimiento y la inteligencia Proverbios 2:6"

FWH 1903 + Bcc7 + PellesC + XEdit easycomp613@gmail.com

Waldemar
Colbún Chile
User avatar
wyerco613
 
Posts: 79
Joined: Wed Mar 06, 2019 8:28 pm

Re: ¿Cómo activo el botón XLS del Preview?

Postby nageswaragunupudi » Mon Jun 10, 2019 6:52 am

If you are generating a preview of a report with code like this:
Code: Select all  Expand view
  local oRep, oFont, oBold, oCol

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

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

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

   ENDREPORT

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

   ACTIVATE REPORT oRep

   RELEASE FONT oFont
 


Please insert this code after ENDREPORT and ACTIVATE REPORT
Code: Select all  Expand view

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

Then, the Excel button of preivew works.
Without this, the preview does not work.
Regards

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

Re: ¿Cómo activo el botón XLS del Preview?

Postby wyerco613 » Thu Jun 13, 2019 12:19 am

Dir Rao

I did what you said me. The sample:

Function ImpBoletas(cRut,cSocio)
Local oLis

Boletas->(DBGoTop())

REPORT oLis TITLE "BOLETAS DE "+cSocio,"","RUT "+cRut;
HEADER "SINDICATO",;
"Fecha: "+Dtoc(Date()),;
"Hora : "+Time() LEFT ;
FOOTER "Pag "+Str(oLis:nPage,3) CENTERED;
CAPTION "Boletas";
PREVIEW

COLUMN TITLE "FECHA" DATA Boletas->FECHA

COLUMN TITLE "Nº BOLETA" DATA Boletas->NUM_BOL

COLUMN TITLE "DETALLE" DATA Boletas->DETALLE

COLUMN TITLE "VALOR" DATA Boletas->VALOR;
PICTURE "@E 99,999,999";
RIGHT TOTAL

END REPORT

oLis:bInit := { || Boletas->( DBGOTOP() ) }

ACTIVATE REPORT oLis

//Boletas->(DBGoTop())

Return(NIL)

But don´t work, the bottom excel on the preview is disable yet.

I do someting bad?

Thank for your help

Waldemar
"Porque Jehová da la sabiduría , Y de su boca viene el conocimiento y la inteligencia Proverbios 2:6"

FWH 1903 + Bcc7 + PellesC + XEdit easycomp613@gmail.com

Waldemar
Colbún Chile
User avatar
wyerco613
 
Posts: 79
Joined: Wed Mar 06, 2019 8:28 pm

Re: ¿Cómo activo el botón XLS del Preview?

Postby nageswaragunupudi » Thu Jun 13, 2019 7:07 pm

What version of FWH you are using?
Regards

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

Re: ¿Cómo activo el botón XLS del Preview?

Postby wyerco613 » Sun Jun 16, 2019 8:59 am

Drae Mr. Rao

My version is FWH 1903, and use pellesC


Best regards

Waldemar
"Porque Jehová da la sabiduría , Y de su boca viene el conocimiento y la inteligencia Proverbios 2:6"

FWH 1903 + Bcc7 + PellesC + XEdit easycomp613@gmail.com

Waldemar
Colbún Chile
User avatar
wyerco613
 
Posts: 79
Joined: Wed Mar 06, 2019 8:28 pm

Re: ¿Cómo activo el botón XLS del Preview?

Postby nageswaragunupudi » Sun Jun 16, 2019 9:24 am

Then it should work. Try clicking on excel button.
Just now this is the program I tested :
You may copy this program to \fwh\samples folder and run with buildh.bat or buildx.bat

Please make sure that you are not using any modifications to the fwh libraray.

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

   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
 


This is the result:
Image
Regards

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

Re: ¿Cómo activo el botón XLS del Preview?

Postby wyerco613 » Mon Jun 17, 2019 11:24 am

Dear Rao

I´ve compiled and linked several examples like FiveDbu and the butttom excel preview works for that i beleave i have to acive some of clase xbrowse or of preiew,

what do you thing?

Best Regards

Waldemar

i use bcc7.
"Porque Jehová da la sabiduría , Y de su boca viene el conocimiento y la inteligencia Proverbios 2:6"

FWH 1903 + Bcc7 + PellesC + XEdit easycomp613@gmail.com

Waldemar
Colbún Chile
User avatar
wyerco613
 
Posts: 79
Joined: Wed Mar 06, 2019 8:28 pm

Re: ¿Cómo activo el botón XLS del Preview?

Postby nageswaragunupudi » Mon Jun 17, 2019 12:25 pm

Are you using any modified report.prg or modified rpreview.prg?
Regards

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

Re: ¿Cómo activo el botón XLS del Preview?

Postby wyerco613 » Wed Jun 19, 2019 12:55 am

Dear Rao

No i did, but my prg (the main) i did not begin of zero I modified a old one (FWXH 13 i guest?), maybe that it is de problem. i've seen a lot prg's and in all cases the object is related to DATA bExcel.

example: oBrw:toExcel(parameters, I don´t know)

My problem is i need work with the classe in "report" and from preview

my email is waldemar@easycomp.cl

thank you very much

Waldemar González
"Porque Jehová da la sabiduría , Y de su boca viene el conocimiento y la inteligencia Proverbios 2:6"

FWH 1903 + Bcc7 + PellesC + XEdit easycomp613@gmail.com

Waldemar
Colbún Chile
User avatar
wyerco613
 
Posts: 79
Joined: Wed Mar 06, 2019 8:28 pm

Re: ¿Cómo activo el botón XLS del Preview?

Postby nageswaragunupudi » Wed Jun 19, 2019 1:22 am

1) You can call oBrw:ToExcel() without any parameters.
2) Export to Excel works from Preview of Report class.
3) I posted a sample above. Please copy the sample to \fwh\samples folder and build it with buildx.bat
Is this sample working for you correctly as expected?
Regards

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

Re: ¿Cómo activo el botón XLS del Preview?

Postby wyerco613 » Wed Jun 19, 2019 5:31 am

nageswaragunupudi wrote:1) You can call oBrw:ToExcel() without any parameters.
2) Export to Excel works from Preview of Report class.
3) I posted a sample above. Please copy the sample to \fwh\samples folder and build it with buildx.bat
Is this sample working for you correctly as expected?


Dear Rao

1) I know that but i need more control about oBrw:ToExcel().
2) To me doesn´t work from Preview. I get 2 function`s give reports with preview and the excel buttom is Disabled.
3) I did and It works very well but when I call from may program it doesn' works.

my function:

Function ImpBoletas(cRut,cSocio)
Local oLis

//cBuscar:=Ctaarr->(Fieldget(3))+Str(Ctaarr->(Fieldget(6)),2)+Str(Ctaarr->(Fieldget(7)),4)
Boletas->(DBGoTop())

REPORT oLis TITLE "BOLETAS DE "+cSocio,"","RUT "+cRut;
HEADER "SINDICATO DE TRABAJADORES HONORARIOS",;
"Fecha: "+Dtoc(Date()),;
"Hora : "+Time() LEFT ;
FOOTER "Pag "+Str(oLis:nPage,3) CENTERED;
CAPTION "Boletas de Medicamentos";
PREVIEW

COLUMN TITLE "FECHA" DATA Boletas->FECHA

COLUMN TITLE "Nº BOLETA" DATA Boletas->NUM_BOL

COLUMN TITLE "DETALLE" DATA Boletas->DETALLE

COLUMN TITLE "VALOR" DATA Boletas->VALOR;
PICTURE "@E 99,999,999";
RIGHT TOTAL

END REPORT

oLis:bInit := { || Boletas->( DBGOTOP() ) }

ACTIVATE REPORT oLis

//Boletas->(DBGoTop())

Return(NIL)

Thanks

Best Regards

Waldemar
"Porque Jehová da la sabiduría , Y de su boca viene el conocimiento y la inteligencia Proverbios 2:6"

FWH 1903 + Bcc7 + PellesC + XEdit easycomp613@gmail.com

Waldemar
Colbún Chile
User avatar
wyerco613
 
Posts: 79
Joined: Wed Mar 06, 2019 8:28 pm


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 105 guests