Hello,
i did not know that method.
But it is not working:
This is a sample:
#include "FiveWin.ch"
#include "report.ch"
#include "inkey.ch"
Function main()
LOCAL oFont1, oFont2
LOCAL oReport
DEFINE FONT oFont1 NAME "ARIAL" SIZE 0,-10
DEFINE FONT oFont2 NAME "ARIAL" SIZE 0,-10 BOLD
SetKey(VK_F2, { || oReport:ToExcel() })
USE TEST NEW
dbgotop()
REPORT oReport TITLE "*** Mi Primer Reporte ***" ;
FONT oFont1, oFont2 ;
PREVIEW CAPTION "Mensaje del t铆tulo"
//oReport:= { || DbGoTop() }
COLUMN TITLE "St" DATA Test->State
COLUMN TITLE "Nombre", "Apellido" ;
DATA Test->First, Test->Last
COLUMN TITLE "Direccion", "Ciudad" ;
DATA Test->Street, Test->City
COLUMN TITLE " Salario" ;
DATA Test->Salary ;
TOTAL ;
RIGHT ;
PICTURE "9,999,999";
FONT 2 ;
SIZE 9
END REPORT
ACTIVATE REPORT oReport
CLOSE TEST
oFont1:End()
oFont2:End()
RETURN NIL
I get:
Error description: (DOS Error -2147352567) WINOLE/1006 Argument error: _FORMULA
Args:
[ 1] = C =SUBTOTAL( 9, D4:D5)
Stack Calls
===========
Called from: => TOLEAUTO:_FORMULA( 0 )
Called from: .\source\classes\REPORT.PRG => TREPORT:TOEXCEL( 2313 )
Called from: test.prg => (b)MAIN( 18 )
If I edit report.ch and comment out:
if lTotal
for nCol := 1 to nCols
oCol := ::aColumns[ nCol ]
if oCol:lTotal
WITH OBJECT oSheet:Cells( nRow, nCol )
//:Formula := "=SUBTOTAL( 9, " + ;
// oSheet:Range( oSheet:Cells( nFirstRow, nCol ), ;
// oSheet:Cells( nRow - 1, nCol ) ):Address( .f., .f. ) + ")"
END
if ( nFont := Eval( oCol:bTotalFont ) ) != aFont[ nCol ]
::xlSetFont( oSheet:Cells( nRow, nCol ), ::aFont[ nFont ] )
endif
endif
next
endif
I get an Excel with headers and titles but no content:
http://i44.tinypic.com/34xgfv5.png
I am sorry about the bad news.
Thank your for our help and support.
regards,
Muchas gracias. Many thanks.
Un saludo, Best regards,
Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producci贸n]
Implementando MSVC 2010, FWH64 y ADO.
Abandonando uso xHarbour y SQLRDD.