Tengo un report donde saco un balance contable, el tema es que tengo tres columnas de importes de las cuales siempre dos de ellas estan a cero, lo que deseo es poner la que no tiene cero como columna a sacar en el report, y no doy con el tema ya que me da este error
Application
===========
Path and name: C:\Proyectos\Wconta\GCONTA.Exe (32 bits)
Size: 709,120 bytes
Time from start: 0 hours 0 mins 10 secs
Error occurred at: 03-02-2009, 16:39:36
Error description: Error BASE/1068 Argument error: array access
Args:
[ 1] = A { ... }
[ 2] = O Object
Stack Calls
===========
Called from: .\source\classes\RCOLUMN.PRG => TRCOLUMN:STABILIZE(0)
Called from: .\source\classes\REPORT.PRG => (b)TREPORT:STABILIZE(0)
Called from: => AEVAL(0)
Called from: .\source\classes\REPORT.PRG => TREPORT:STABILIZE(0)
Called from: .\source\classes\REPORT.PRG => TREPORT:ACTIVATE(0)
Called from: C:\PROYEC~1\Wconta\Source\gesh0520.prg => IMPRIMEBAL(534)
este es el codigo del report.
* ----------------------------------------------------------------------------
Function ImprimeBal(aBalance)
* ----------------------------------------------------------------------------
LOCAL aoFont[3], oPen1, oPen2
Local oReport
Local nSele := SELECT()
Local nImporte := 0,n := 0
Local cMes := "de "+NombMes(aBalance[2])
Local cTitulo
dbSelectArea("BALA")
BALA->(dbGotop())
DEFINE FONT aoFont[1] NAME "ARIAL" SIZE 0,-9 BOLD
DEFINE FONT aoFont[2] NAME "ARIAL" SIZE 0,-9
DEFINE FONT aoFont[3] NAME "ARIAL" SIZE 0,-10 BOLD
DEFINE PEN oPen1 WIDTH 3 COLOR CLR_HGREEN
DEFINE PEN oPen2 WIDTH 1 COLOR CLR_HMAGENTA
dbSelectArea("BALA")
BALA->(dbGotop())
PrinterSetup()
REPORT oReport TITLE "BALANCE DE ACTIVO Y PASIVO", ;
aDatEmp[1]+" EJERCICIO : " +aDatEmp[7],;
"Datos al mes "+cMes;
FONT aoFont[1], aoFont[2],aoFont[3] ;
PEN oPen1, oPen2 ;
HEADER "Fecha: "+aBalance[3],"","Página:"+Str(oReport:nPage,3) RIGHT ;
PREVIEW
cTitulo := BALA->descrip
If BALA->importe == 0 .and. BALA->totalgrupo <> 0
nImporte := BALA->totalgrupo
n := 3
ElseIf BALA->importe == 0 .and. BALA->totalsgrup <> 0
nImporte := BALA->totalsgrup
n := 1
ElseIf BALA->importe <> 0
nImporte := BALA->importe
n := 2
EndIf
COLUMN TITLE "DESCRIPCION" ;
DATA cTitulo ;
FONT aoFont[2] ;
GRID 2
COLUMN TITLE "IMPORTE" ;
DATA nImporte ;
PICTURE "9,999,999.99";
FONT aoFont[n];
GRID 2
END REPORT
ACTIVATE REPORT oReport
For n := 1 to 3
aoFont[n]:End()
EndFor
oPen1:End()
oPen2:End()
RETURN NILUna ayudita plis, es urgente. Gracias
Pedro
gahetesoft@gmail.com
FWH12.06 BCC582, Xverce CW, Pelles C 6.00.4,PSPAD 4.54
y ahora con ADO