FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour TRepXls: Class to create reports to Excel type columns
Posts: 476
Joined: Sat Feb 03, 2007 06:36 AM

TRepXls: Class to create reports to Excel type columns

Posted: Tue Dec 16, 2014 12:02 AM
Hello everyone.
Here I give you my work TRepXls, develop a few years ago:
http://www.sistemaempresarial.com.gt/downloads/TRepXls.zip

This class creates reports to Excel, with a syntax similar to TReport FWH:
Code (fw): Select all Collapse
 REPXLS oReport ;
          HEADER "*** FiveWin Report DEMO ***",;
                 "",;
                 "Utilizando Excel - TRepXls",;
                 "", ;
                 "Date: "+dtoc(date()),;
                 "Time:  "+time() ;
          TO FILE cFile ;
          FONT oFont1, oFont2, oFont3 ;
          FORMAT nFormat1, nFormat2, nFormat3, nFormat4
          

     ADD COLREPXLS TO oReport TITLE "City" CENTER;
          DATA Customer->City SIZE 30

     ADD COLREPXLS TO oReport TITLE "First Name" CENTER;
          DATA Customer->First SIZE 30
          
     ADD COLREPXLS TO oReport TITLE "Last Name" CENTER;
          DATA Customer->Last  SIZE 30

     ADD COLREPXLS TO oReport TITLE "   Salary" CENTER;
          DATA Str(Customer->Salary) ;
          FORMAT 1 ;
          SIZE 12 ;
          TOTAL 

     GROUPXLS TO oReport ON Customer->State ;
           HEADER "State "+oReport:aGroups[1]:cValue ;
           FOOTER "Total State "+oReport:aGroups[1]:cValue ;
           FONT 3
          
    oReport:bSkip  := { || Customer->( DbSkip() ) }
    oReport:bWhile := { || !Customer->( Eof() )}

    oReport:aHeadFont[1] := 3
    oReport:aHeadFont[3] := 2

    //Marcar Celdas
       oReport:lCellView := .t.

    ACTIVATE REPXLS oReport ;
             ON INIT ( Customer->( DbGotop() ) )


It is something like other work that I did, TRepDos:
https://bitbucket.org/fivetech/fivewin-contributions/downloads/Trepdos.zip
http://forums.fivetechsupport.com/viewtopic.php?f=6&t=29779#p168563

This class uses the TFileXls classes Ramón Avendaño, and TExcelScript Victor Manuel Tomas Diaz.

I hope it will be useful, and if anyone is encouraged to add more options, just expect that also put in the forum, to try them.

Greetings.
Posts: 866
Joined: Tue Oct 16, 2007 08:57 AM

Re: TRepXls: Class to create reports to Excel type columns

Posted: Tue Dec 16, 2014 06:34 AM

Thanks a lot.
But I can't download TRepXls.zip

Best Regards,



Richard



Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 32bit

MySQL v8.0

Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 64bit
Posts: 476
Joined: Sat Feb 03, 2007 06:36 AM

Re: TRepXls: Class to create reports to Excel type columns

Posted: Tue Dec 16, 2014 11:00 AM

Richard,
I've checked the link and it works correctly.
Can you try again.

Best regards.

Carlos.

Posts: 866
Joined: Tue Oct 16, 2007 08:57 AM

Re: TRepXls: Class to create reports to Excel type columns

Posted: Tue Dec 16, 2014 03:37 PM
csincuir wrote:Richard,
I've checked the link and it works correctly.
Can you try again.

Best regards.

Carlos.

Carlos,

sorry, now it's OK. Thanks a lot.
Best Regards,



Richard



Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 32bit

MySQL v8.0

Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 64bit

Continue the discussion