//------------------------------------------//
Function LstEstdCta(oQry, dFechaI,dFechaF,cCta,cNomCta,nRecno,lCtaAcreed)
local oReport, oPrn, oFont1, oFont2, oFont3, oFont4, oPen1, oPen2, nCancelar := 0
local cTitulo := "DETALLE DE LA CTA: "+ alltrim(cCta)+" "+alltrim(cNomCta)
local nDebe := 0, nHaber := 0
local cFecha
cFecha := Fechador(dFechaI,dFechaF)
nCancelar := PrinterSetup(oPrn)
if nCancelar = 0
return nil
endif
DEFINE FONT oFont1 NAME "ARIAL" SIZE 0,-08
DEFINE FONT oFont2 NAME "ARIAL" SIZE 0,-09 BOLD
DEFINE FONT oFont3 NAME "ARIAL" SIZE 0,-10 BOLD ITALIC
DEFINE FONT oFont4 NAME "ARIAL" SIZE 0,-10 BOLD ITALIC
DEFINE PEN oPen1 WIDTH 1
DEFINE PEN oPen2 WIDTH 1
REPORT oReport CAPTION cTitulo PREVIEW ;
HEADER EMPRESA +" "+ MEMBRE, "" ,; //Se usa HEADER como TITLE
cTitulo ,;
cFecha CENTER ;
TITLE "Fecha: " + DToC(Date()) ,; //Se usa TITLE como HEADER
"Hoja No:"+STR(oReport:nPage,3) ;
FONT oFont1,oFont2,oFont3,oFont4 ;
PEN oPen1,oPen2
COLUMN TITLE "Fecha" DATA "" SIZE 10
COLUMN TITLE "Dcto No." DATA "" SIZE 10
COLUMN TITLE "Concepto" DATA "" SIZE 48
COLUMN TITLE "Debitos" DATA "" SIZE 12
COLUMN TITLE "Creditos" DATA "" SIZE 12
COLUMN TITLE "Saldo" DATA "" SIZE 12
END REPORT
IF oReport:lCreated
oReport:SetTxtColor(CLR_BLACK,1)
oReport:SetTxtColor(CLR_HRED,2)
oReport:SetTxtColor(CLR_HRED,3)
oReport:SetTxtColor(CLR_GREEN,4)
oReport:SetPenColor(CLR_HBLUE)
oReport:SetShdColor(CLR_YELLOW)
oReport:oHeader:aFont[1] := {|| 3 }
oReport:oHeader:aFont[3] := {|| 4 }
oReport:oHeader:aFont[4] := {|| 4 }
oReport:oTitle:aPad[1] := RPT_LEFT //fecha
oReport:oTitle:aPad[2] := RPT_RIGHT //pag
oReport:nTopMargin := 300
oReport:nDnMargin := 300
oReport:bInit := {|| oQry:GoTop() }
oReport:bSkip := {|| oQry:Skip() }
oReport:bEndPage := {|| if(!oReport:lFinish, ( oReport:nRow += 32, oReport:TotalLine(oReport:nGroupLine, 1) ),) }
AEval(oReport:aColumns,{|oCol| oCol:nAlignTitle := RPT_CENTER })
ENDIF
ACTIVATE REPORT oReport ;
ON CHANGE LnDatos(oReport, oQry, @nDebe ,@nHaber) ;
ON END LnGranTot(oReport, nDebe, nHaber) ;
WHILE !oQry:Eof()
RELEASE oFont1,oFont2,oFont3,oFont4,oPen1,oPen2
RETURN(.T.)
//------------------------------------------//
Function LnDatos(oReport, oQry, nDebe, nHaber)
oReport:Say( 1, oQry:FECHEMIS, 1, 1 )
oReport:Say( 2, oQry:NUMDOC, 1, 1 )
oReport:Say( 3, Substr(oQry:CONCEPTO,1,48), 1, 1 )
oReport:Say( 4, Transform( oQry:DEBE, "9,999,999,999.99" ), 1, 2 )
oReport:Say( 5, Transform( oQry:HABER,"9,999,999,999.99" ), 1, 2 )
oReport:Say( 6, Transform( oQry:SALDO,"9,999,999,999.99" ), 1, 2 )
nDebe += oQry:DEBE
nHaber += oQry:HABER
Return nil
//------------------------------------------//
Function LnGranTot(oReport, nDebe, nHaber)
oReport:NewLine()
oReport:TotalLine(oReport:nGroupLine, 1) //lin sencilla
oReport:Say( 3, "Total Debitos y Creditos", 1, 2 )
oReport:Say( 4, Transform( nDEBE, "9,999,999,999.99" ), 1, 2 )
oReport:Say( 5, Transform( nHABER,"9,999,999,999.99" ), 1, 2 )
oReport:NewLine()
oReport:TotalLine(oReport:nTotalLine, 1) //lin doble
Return nil