Mr. Rao, From PREVIEW To Excel

Post Reply
User avatar
Armando
Posts: 2479
Joined: Fri Oct 07, 2005 8:20 pm
Location: Toluca, México
Contact:

Mr. Rao, From PREVIEW To Excel

Post by Armando »

Mr. Rao:

I have the following code.

Code: Select all

    REPORT oReporte CAPTION cTitulo PREVIEW ;
        HEADER ALLTRIM(oApp:cRazonSocial),;
        "",;
        cTitulo CENTER;
        TITLE "Fecha: "+Date2Txt(DATE()),;
        "Hoja No:"+STR(oReporte:nPage,3);
        FONT oFont1,oFont2,oFont3;
        PEN oPen1,oPen2

        COLUMN TITLE "Folio"            DATA "" SIZE  4 RIGHT
        COLUMN TITLE "Concepto"     DATA "" SIZE 35 LEFT
        COLUMN TITLE "Referencia"   DATA "" SIZE 12 LEFT
        COLUMN TITLE "Importe"      DATA "" SIZE 11 RIGHT
        COLUMN TITLE "Prestamos"    DATA "" SIZE 11 RIGHT
    END REPORT

    IF oReporte:lCreated
        oReporte:SetTxtColor(CLR_BLACK,1)
        oReporte:SetTxtColor(CLR_HRED,2)
        oReporte:SetTxtColor(CLR_HRED,3)
        oReporte:SetPenColor(CLR_HBLUE)
        oReporte:SetShdColor(CLR_YELLOW)
        oReporte:oHeader:aFont[1] := {||3}

        oReporte:oTitle:aPad[1] := RPT_LEFT
        oReporte:oTitle:aPad[2] := RPT_RIGHT

      oReporte:bInit := {|| oRsGas:MoveFirst() }

        oReporte:nTopMargin     := 300
        oReporte:nDnMargin      := 300

       oReporte:bSkip := { || (nLinea++, oRsGas:MoveNext())}

    ENDIF

   ACTIVATE REPORT oReporte ;
        ON STARTPAGE Alinea(oReporte,1,2);
        ON CHANGE PonDet(oReporte);
        ON END (TotFin(oReporte,oBrw),oRsGas:BookMark := nBookMark);
      WHILE nLinea <= nHasta

    oRsGas:SORT := "GAS_GAS ASC"

    oBrw:Refresh()

    oFont1:Release()
    oFont2:Release()
    oFont3:Release()
    oPen1:Release()
    oPen2:Release()
RETURN(.T.)
 
Image

But when exporting it to Excel shows it incomplete, could you help me?, what am I omitting?

Image

With best regards
SOI, s.a. de c.v.
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero
User avatar
karinha
Posts: 4882
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: Mr. Rao, From PREVIEW To Excel

Post by karinha »

Que belo REPORT Armando, podrias poner el código completo para el amigo aqui?

Muchas gracias.

Regards, saludos.
João Santos - São Paulo - Brasil
User avatar
Armando
Posts: 2479
Joined: Fri Oct 07, 2005 8:20 pm
Location: Toluca, México
Contact:

Re: Mr. Rao, From PREVIEW To Excel

Post by Armando »

Karinha:

El código está completo. Si te reclama algo me avisas.

Saludos
SOI, s.a. de c.v.
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero
Post Reply