Hola buenos dias mis estimados,esperando que se encuentren bien, les envio cordial saludos.
Hace muchos a帽os, que hasta la fecha se me presenta preguntar al foro...peeroo es muy molestoso para el usuario y para mi....!
驴 Porque cuando mando imprimir un reporte me sale del mismo ejecutable como si tuviera dos exes....cuando solo quiero tener uno, o que tipo de ventana mandar a llamar al imprimir mi reporte,y me sale mismo ejecutable....sera por ventana padre a hija ,espero que alguien me pueda ayudar y un peque帽o ejemplo para que no me salga dos ejecutablaes.... expongo la imagen.!


http://www.4shared.com/account/home.jsp#dir=a_9IZFb7
Saludos y espero que con esta imagen sea mas explicito que mis palabras,o tengo que usar definiciones de ventanas padres e hijos...aceptp ejemplos e imagenes o codigo de ventanas mdchild.....
Expongo codigo ....y me digan en donde estoy fallando ...que me sale como si fuera dos ejecetables...imagen anexada...!
Saludos .!
Atte: Adrian C. C.
Hace muchos a帽os, que hasta la fecha se me presenta preguntar al foro...peeroo es muy molestoso para el usuario y para mi....!
驴 Porque cuando mando imprimir un reporte me sale del mismo ejecutable como si tuviera dos exes....cuando solo quiero tener uno, o que tipo de ventana mandar a llamar al imprimir mi reporte,y me sale mismo ejecutable....sera por ventana padre a hija ,espero que alguien me pueda ayudar y un peque帽o ejemplo para que no me salga dos ejecutablaes.... expongo la imagen.!
http://www.4shared.com/account/home.jsp#dir=a_9IZFb7
Saludos y espero que con esta imagen sea mas explicito que mis palabras,o tengo que usar definiciones de ventanas padres e hijos...aceptp ejemplos e imagenes o codigo de ventanas mdchild.....
Expongo codigo ....y me digan en donde estoy fallando ...que me sale como si fuera dos ejecetables...imagen anexada...!
#include "Fivewin.ch"
#include "FileXls.ch"
Static xEmp, oDlg, oGet, oBtn,cMesPerAct,cAnoPerAct,cCtaIni, cCtaFin,lSelSeg,nSegIni, nSegFin, nMA_Ini, nMA_Fin,;
cArchExp // Dialogo
Static S05, S08, S09, S10, S13 // Alias de base de datos
Static nReg,aSum, aTot, aCarg,aAbon // Reportes
MemVar oMOpc, S04,nNumEmp, cDescrEmp, Mes_Per, Ano_Per, AnoPerRep, EjeMAIn, lApSeg, nRow, nStation
//------------------------------------------------------------------------------
FUNCTION R_INTSDO()
LOCAL oItem:=oMOpc, cMes, cAno
xEmp := nNumEmp
cMesPerAct:= Mes_Per
cAnoPerAct:= Ano_Per
cMes := TSTR(MES_PER)
cAno := VAL(SUBS(STR(ANO_PER,4),3,2))
*nMA_Ini := cMes+TSTR(cAno)
nMA_Ini := EjeMAIn
nMA_Fin := cMes+TSTR(cAno)
oGet := Array(8)
oBtn := Array(2)
cCtaIni := SPACE(19)
cCtaFin := SPACE(19)
lApSeg := (S04)->AP_SEGNG
lSelSeg := IF(lApSeg,.T.,.F.)
nSegIni := 0
nSegFin := 0
cArchExp:= SPACE(18) // EdoCuenta_ago2013
S08 := Abre_Dbf(8,8) // ABRE CATCTAxA.DBF
S09 := Abre_Dbf(9,9) // ABRE SEG_NEG.DBF
S10 := Abre_Dbf(10,10) // ABRE CATCSNxA.DBF
DEFINE DIALOG oDlg RESOURCE "R_AUXCTA" TITLE "Reporte integraci贸n de saldos general"
REDEFINE GET oGet[01] VAR cCtaIni ID 101 OF oDlg BITMAP "AYUDA" PICTURE "@K###################";
ACTION (ListCat(@cCtaIni,S08,"cCtaIni",oGet[01]));
VALID V_FormCta("cCtaIni",cCtaIni)
REDEFINE GET oGet[02] VAR cCtaFin ID 102 OF oDlg BITMAP "AYUDA" PICTURE "@K###################";
ACTION (ListCat(@cCtaFin,S08,"cCtaFin",oGet[02]));
VALID V_FormCta("cCtaFin",cCtaFin)
REDEFINE CHECKBOX oGet[03] VAR lSelSeg ID 103 OF oDlg WHEN lApSeg
REDEFINE GET oGet[04] VAR nSegIni ID 104 OF oDlg BITMAP "AYUDA" PICT "9999";
ACTION ListSegN(@nSegIni,S09,"nSegIni",oGet[04]);
WHEN IF(lApSeg,lSelSeg,.F.) VALID V_SEGNG("nSegIni")
REDEFINE GET oGet[05] VAR nSegFin ID 105 OF oDlg BITMAP "AYUDA" PICT "9999";
ACTION ListSegN(@nSegFin,S09,"nSegFin",oGet[05]);
WHEN IF(lApSeg,lSelSeg,.F.) VALID V_SEGNG("nSegFin")
REDEFINE GET oGet[06] VAR nMA_Ini ID 106 OF oDlg PICTURE "@!X" ACTION (A_MA("MA_Ini",oGet[06]))
REDEFINE GET oGet[07] VAR nMA_Fin ID 107 OF oDlg PICTURE "@!X" ACTION (A_MA("MA_Fin",oGet[07]))
REDEFINE GET oGet[08] VAR cArchExp ID 108 OF oDlg PICTURE "@A" // VALID _Exportar(cArchExp)
oGet[01]:bKeyDown := { |nKey| IIF( nKey == VK_F2,(oGet[01]:Assign(),Eval( oGet[01]:bAction )),"" ) }
oGet[01]:cToolTip := "Presiona F2"
oGet[02]:bKeyDown := { |nKey| IIF( nKey == VK_F2,(oGet[02]:Assign(),Eval( oGet[02]:bAction )),"" ) }
oGet[02]:cToolTip := "Presiona F2"
oGet[04]:bKeyDown := { |nKey| IIF( nKey == VK_F2,(oGet[04]:Assign(),Eval( oGet[04]:bAction )),"" ) }
oGet[04]:cToolTip := "Presiona F2"
oGet[05]:bKeyDown := { |nKey| IIF( nKey == VK_F2,(oGet[05]:Assign(),Eval( oGet[05]:bAction )),"" ) }
oGet[05]:cToolTip := "Presiona F2"
oGet[06]:bKeyDown := { |nKey| IIF( nKey == VK_F2,(oGet[06]:Assign(),Eval( oGet[06]:bAction )),"" ) }
oGet[06]:cToolTip := "Presiona F2"
oGet[07]:bKeyDown := { |nKey| IIF( nKey == VK_F2,(oGet[07]:Assign(),Eval( oGet[07]:bAction )),"" ) }
oGet[07]:cToolTip := "Presiona F2"
REDEFINE BUTTON oBtn[1] ID 201 OF oDlg ACTION I_INTSDO(cCtaIni,cCtaFin), oDlg:End()
*REDEFINE BUTTON oBtn[1] ID 201 OF oDlg ACTION (MsgRun("Generando informe...espera",,;
* {|| I_INTSDO(cCtaIni,cCtaFin)}),oDlg:End()) // (I_INTSDO(cCtaIni,cCtaFin)) //
REDEFINE BUTTON oBtn[2] ID 202 OF oDlg ACTION oDlg:END()
ACTIVATE DIALOG oDlg CENTER VALID (oItem:Enable(),.T.)
Close_Dbf(5,S05)
Close_Dbf(8,S08)
Close_Dbf(9,S09)
Close_Dbf(10,S10)
Close_Dbf(13,S13)
*IF SELECT("S91") > 0 // Verifica si esta activa el Alias
* S98->(DbCloseArea())
* FERASE("EMP"+TSTR(nNumEmp)+"\"+"R_INTS"+nStation)+".DBF")
* FERASE("EMP"+TSTR(nNumEmp)+"\"+"R_INTS"+nStation)+".CDX")
*ENDIF
Release oItem:=oMOpc, cMes, cAno
RETURN NIL
//------------------------------------------------------------------------------
STATIC FUNCTION ListCat(Ctaf,S08,VarCta,oGetCpo)
Default oGetCpo := NIL
IF SelCta(Ctaf,S08)
DO CASE
CASE VarCta = "cCtaIni"
cCtaIni := EXT_xNIV((S08)->CUENTAS)
CASE VarCta = "cCtaFin"
cCtaFin := EXT_xNIV((S08)->CUENTAS)
ENDCASE
ENDIF
oGetCpo:Refresh()
RETURN NIL
//------------------------------------------------------------------------------
Static FUNCTION V_FormCta(VarCta, CtAf)
Local FormCtas
IF !GetKeyState( VK_RETURN ) .and. !GetKeyState( VK_DOWN ) .and. !GetKeyState( VK_TAB )
RETURN( .T. )
ENDIF
IF EMPTY(Ctaf)
MsgAlert("Error: Campo no puede quedar vac铆o")
RETURN .F.
ENDIF
FormCtas := FORMATO1(VarCta, Ctaf, .T.)
DO CASE
CASE VarCta == "cCtaIni"
cCtaIni := FormCtas
cCtaFin := cCtaIni
CASE VarCta == "cCtaFin"
cCtaFin := FormCtas
IF cCtaIni > cCtaFin
cCtaFin := SPACE(19)
oGet[02]:Refresh()
MsgInfo('ERROR: Cuenta debe ser mayor o igual que el inicial')
RETURN .F.
ENDIF
ENDCASE
oGet[01]:Refresh()
oGet[02]:Refresh()
Release FormCtas
RETURN (.T.)
//------------------------------------------------------------------------------
STATIC FUNCTION ListSegN(nSegNg,S09,VarSegN,oGetCpo)
Default oGetCpo := NIL
IF SelSegNg(nSegNg,S09)
DO CASE
CASE VarSegN = "nSegIni"
nSegIni := (S09)->SEGNEG
CASE VarSegN = "nSegFin"
nSegFin := (S09)->SEGNEG
ENDCASE
ENDIF
oGetCpo:Refresh()
RETURN NIL
//------------------------------------------------------------------------------
STATIC FUNCTION V_SEGNG(CpoVar)
IF !GetKeyState( VK_RETURN ) .and. !GetKeyState( VK_DOWN ) .and. !GetKeyState( VK_TAB )
RETURN( .T. )
ENDIF
DO CASE
CASE CpoVar = "nSegIni"
(S09)->(DbSeek(STR(nSegIni,4)))
IF (S09)->(FOUND())
nSegFin := nSegIni
ELSE
MsgInfo("ERROR: Segmento de Negocio no existe","Confirme'")
RETURN .F.
ENDIF
CASE CpoVar = "nSegFin"
IF !nSegIni == nSegFin // Por mientras....unicamente se pedir谩 segmento negocio
*IF nSegIni > nSegFin
nSegFin := nSegIni
oGet[05]:Refresh()
MsgInfo('ERROR: Segmento de Negocio debe ser mayor o igual que el inicial')
RETURN .F.
ENDIF
(S09)->(DbSeek(STR(nSegFin,4)))
IF !(S09)->(FOUND())
MsgInfo("ERROR: Segmento de Negocio no existe","Confirme'")
RETURN .F.
ENDIF
ENDCASE
oGet[04]:Refresh()
oGet[05]:Refresh()
RETURN (.T.)
//------------------------------------------------------------------------------
STATIC FUNCTION A_MA(VarCampo,oGetCpo)
Default oGetCpo := NIL
S05 := Abre_Dbf(5,5) // ABRE MA_MOVTO.DBF
IF SelPeriodo(S05)
DO CASE
CASE VarCampo == "MA_Ini"
nMA_Ini = (S05)->MESANO
CASE VarCampo == "MA_Fin"
nMA_Fin = (S05)->MESANO
ENDCASE
ENDIF
Close_Dbf(5,S05)
oGetCpo:Refresh()
RETURN (.T.)
//------------------------------------------------------------------------------
STATIC FUNCTION I_INTSDO(CtaInif, CtaFinf)
Local oPrn, oFont,oFont1, oFont2, nVer, nHor
Local S91, Ind1Tmp1, Ind1Tmp2, CreaDbf1,TitRp,CtaIni, CtaFin,PasaCta := .T.,;
cMA_Ini, cMA_Fin,cCtas,nSegNeg,cCtSN // oText
CtaIni := SUBS(CtaInif,1,4)+SUBS(CtaInif,6,4)+SUBS(CtaInif,11,4)+SUBS(CtaInif,16,4)
CtaFin := SUBS(CtaFinf,1,4)+SUBS(CtaFinf,6,4)+SUBS(CtaFinf,11,4)+SUBS(CtaFinf,16,4)
cMA_Ini := SUBS(nMA_Ini,3,2)+SUBS(nMA_Ini,1,2)
cMA_Fin := SUBS(nMA_Fin,3,2)+SUBS(nMA_Fin,1,2)
***********************************************************************************
*----- Traspasando cuentas integraci贸n de saldos general en archivo temporal -----*
***********************************************************************************
S91 := "EMP"+TSTR(xEMP)+TRIM("\R_INTS"+nStation)+".DBF"
Ind1Tmp1:= "R_INTS"+nStation
Ind1Tmp2:= "R_INTSN"
nReg := 1
IF FILE(S91)
*S91->(DbCloseArea())
FERASE(S91)
FERASE("EMP"+TSTR(nNumEmp)+"\"+Ind1Tmp1+".CDX")
ENDIF
FIELD CUENTAS, SEGNEG, REFERE
IF !FILE(S91)
CreaDbf1 := {{"TIPO " , "C" , 2 , 0 } ,; // 1
{"NUMPOL " , "N" , 5 , 0 } ,; // 2
{"FHAMOV " , "D" , 8 , 0 } ,; // 3
{"CUENTAS" , "C" , 16 , 0 } ,; // 4
{"SEGNEG" , "N" , 4 , 0 } ,; // 5
{"REFERE " , "C" , 10 , 0 } ,; // 6
{"CONCEP " , "C" , 60 , 0 } ,; // 7
{"SALCARG" , "N" , 12 , 2 } ,; // 8
{"SALCRED" , "N" , 12 , 2 } ,; // 9
{"SALDOS" , "N" , 12 , 2 } ,; //10 Sdo de factura a pagar
{"IMPBS1" , "N" , 12 , 2 } ,; //11 Base 1
{"TASA1" , "N" , 12 , 2 } ,; //12 Tasa 1
{"IVA_1" , "N" , 12 , 2 } ,; //13 IVA 10%
{"IMPBS2" , "N" , 12 , 2 } ,; //14 Base 2
{"TASA2" , "N" , 12 , 2 } ,; //15 Tasa 2
{"IVA_2" , "N" , 12 , 2 } ,; //16 IVA 15%
{"T_0" , "N" , 12 , 2 } ,; //17 Tasa 0
{"T_EXENT" , "N" , 12 , 2 } ,; //18 Exento
{"OTROS" , "N" , 12 , 2 } ,; //19 Otros
{"IMPBS3" , "N" , 12 , 2 } ,; //20 Otras tasas
{"T_Otras" , "N" , 12 , 2 } ,; //21 IVA x 0
{"RET_IVA" , "N" , 12 , 2 } ,; //22 Ret IVA
{"RET_ISR" , "N" , 12 , 2 } ,; //23 Ret ISR
{"TOTFAC" , "N" , 12 , 2 } ,; //24 Importe total por factura
{"REG " , "N" , 3 , 0 }} //25
DbCreate(S91,CreaDbf1)
USE (S91) ALIAS S91 EXCLUSIVE // NEW SHARED
INDEX ON CUENTAS+REFERE TAG (Ind1Tmp1) FOR !DELETED()
INDEX ON STR(SEGNEG,4)+CUENTAS+REFERE TAG (Ind1Tmp2) FOR !DELETED()
S91->(DbSetIndex(Ind1Tmp1))
S91->(OrdSetFocus(1))
ELSE
USE (S91) ALIAS S91 EXCLUSIVE // NEW SHARED
ZAP
INDEX ON CUENTAS+REFERE TAG (Ind1Tmp1) FOR !DELETED()
INDEX ON STR(SEGNEG,4)+CUENTAS+REFERE TAG (Ind1Tmp2) FOR !DELETED()
S91->(DbSetIndex(Ind1Tmp1))
S91->(OrdSetFocus(1))
ENDIF
aCarg:= {{0,0,0}}
aAbon:= {{0,0,0}}
S05 := Abre_Dbf(5,5) // ABRE MA_MOVTO.DBF
(S05)->(DbSEEK(cMA_Ini))
DO WHILE (S05)->ANOMES >= cMA_Ini .AND. (S05)->ANOMES <= cMA_Fin .AND. (S05)->(!EOF())
MES_PER := VAL(SUBS((S05)->ANOMES,3,2))
ANO_PER := VAL(SUBS((S05)->ANOMES,1,2))
S13 := Abre_Dbf(13,13) // ABRE: MOVTxMxA.DBF
IF lSelSeg
(S13)->(DbSetOrder(6)) // Mov Segmentos con referencia
(S13)->(DbGoTop())
(S13)->(SetSeek(STR(nSegIni,4)+CtaIni))
ELSE
(S13)->(DbSetOrder(4)) // Mov con referencia
(S13)->(DbGoTop())
(S13)->(SetSeek(CtaIni))
ENDIF
DO WHILE (S13)->(!EOF())
IF lSelSeg
IF (S13)->MV_NCTA > CtaFin .OR. (S13)->SEGNEG >nSegFin
EXIT
ENDIF
IF (S13)->SEGNEG > nSegIni .OR. (S13)->SEGNEG < nSegFin
(S13)->(DbSkip())
LOOP
ENDIF
S91->(DbSetOrder(2))
S91->(DbSeek(STR((S13)->SEGNEG,4)+(S13)->MV_NCTA+(S13)->MV_REFE))
ELSE
IF (S13)->MV_NCTA > CtaFin
EXIT
ENDIF
S91->(DbSeek((S13)->MV_NCTA+(S13)->MV_REFE))
ENDIF
IF S91->(!FOUND())
S91->(DbAppend())
REPLACE S91->TIPO WITH (S13)->MV_TIPO ,;
S91->NUMPOL WITH (S13)->MV_NUMP ,;
S91->FHAMOV WITH (S13)->MV_FHAM ,;
S91->CUENTAS WITH (S13)->MV_NCTA ,;
S91->SEGNEG WITH (S13)->SEGNEG ,;
S91->REFERE WITH (S13)->MV_REFE ,;
S91->CONCEP WITH (S13)->MV_CONC
ELSE
DO WHILE S91->(!RLOCK())
ENDDO
ENDIF
IF (S13)->TIPOMOV = "A"
aAbon[1,1] := (S13)->IMPBS1
aAbon[1,2] := (S13)->IMPBS2
aAbon[1,3] := (S13)->OTROS
ELSE
aCarg[1,1] := (S13)->IMPBS1
aCarg[1,2] := (S13)->IMPBS2
aCarg[1,3] := (S13)->OTROS
ENDIF
IF (S13)->MV_CARG <> 0
REPLACE S91->SALCARG WITH (S13)->MV_CARG + S91->SALCARG ,;
S91->REG WITH S91->REG - nReg
IF (S13)->MV_ABON <> 0 // Si existe en mismo renglon el saldo de abonos \\
REPLACE S91->SALCRED WITH (S13)->MV_ABON + S91->SALCRED ,;
S91->REG WITH S91->REG - nReg
ENDIF
ELSE
REPLACE S91->SALCRED WITH (S13)->MV_ABON + S91->SALCRED ,;
S91->REG WITH IF((S13)->MV_ABON >0,S91->REG + nReg,S91->REG - nReg)
ENDIF
IF (S13)->TIPOMOV = "A"
REPLACE S91->TASA1 WITH (S13)->TASA1 ,;
S91->TASA2 WITH (S13)->TASA2
ENDIF
REPLACE S91->SALDOS WITH S91->SALCARG - S91->SALCRED ,;
S91->IMPBS1 WITH (aAbon[1,1] - aCarg[1,1]) + S91->IMPBS1 ,;
S91->IVA_1 WITH ROUND(S91->IMPBS1 * S91->TASA1 / 100,2) ,;
S91->IMPBS2 WITH (aAbon[1,2] - aCarg[1,2]) + S91->IMPBS2 ,;
S91->TASA2 WITH IF((S13)->TIPOMOV = "A",(S13)->TASA2,0) ,;
S91->IVA_2 WITH ROUND(S91->IMPBS2 * S91->TASA2 / 100,2) ,;
S91->T_0 WITH (S13)->T_0 + S91->T_0 ,;
S91->T_EXENT WITH (S13)->T_EXENT + S91->T_EXENT ,;
S91->OTROS WITH (aAbon[1,3] - aCarg[1,3]) + S91->OTROS ,;
S91->TOTFAC WITH S91->IMPBS1+S91->IVA_1+S91->IMPBS2+ ;
S91->IVA_2+S91->T_0+S91->T_EXENT + ;
S91->OTROS
aCarg:= {{0,0,0}}
aAbon:= {{0,0,0}}
(S13)->(DbSkip())
ENDDO
(S05)->(DbSkip())
Close_Dbf(13,S13)
ENDDO
Close_Dbf(8,S08)
Close_Dbf(10,S10)
*--------------- Inicia impresi贸n de cuentas integraci贸n de saldos general ---------------*
S08 := Abre_Dbf(8,8) // ABRE CATCTAxA.DBF
S10 := Abre_Dbf(10,10) // ABRE CATCSNxA.DBF
(S08)->(DbGoTop())
(S10)->(DbGoTop())
S91->(DbGoTop())
TitRp := "Reporte integraci贸n de saldos general "+(F_DMA(,,Mes_Per,.F.,'MA',.T.,AnoPerRep))
IF !EMPTY(cArchExp)
Gen_Excel(cArchExp, TitRp, CtaIni, CtaFin,cCtas,nSegNeg,cCtSN,PasaCta)
RETURN NIL
ENDIF
oPrn := PrintBegin(TitRp,.F.,.T.,,.T.)
DEFINE FONT oFont1 NAME "ARIAL" SIZE 0,- 8 OF oPrn // Fuentes a usar en el reporte
DEFINE FONT oFont2 NAME "ARIAL" SIZE 0,-10 BOLD OF oPrn
*nHor := oPrn:nHorzSize()
*nVer := oPrn:nVertSize()
oPrn:lPrvModal := .F.
oPrn:SetPortrait()
CursorWait()
aSum := {{0,0,0,0,0,0,0}}
aTot := {{0,0,0,0,0,0,0}}
PageBegin()
TitEmpresa(TitRp, oPrn, oFont1)
TitDatos(oPrn, oFont1)
nRow := 3.0
cCtas := S91->CUENTAS
DO WHILE S91->(!EOF())
IF S91->SALDOS <> 0 .AND. aSum[1,3] <> 0
IF cCtas <> S91->CUENTAS
PasaCta := .T.
oPrn:CmSay(nRow,8.0, REPLI("-",86) ,oFont1,,CLR_BLACK,,)
nRow = nRow + 0.4
oPrn:CmSay(nRow,10.2, TRANS(aSum[1,1],"999,999,999.99"),oFont1,,IF(aSum[1,1] < 0,CLR_HRED,CLR_BLACK),,1) //Cargos
oPrn:CmSay(nRow,12.2, TRANS(aSum[1,2],"999,999,999.99"),oFont1,,IF(aSum[1,2] < 0,CLR_HRED,CLR_BLACK),,1) //Abonos
oPrn:CmSay(nRow,14.1, TRANS(aSum[1,3],"999,999,999.99"),oFont1,,CLR_BLACK,,1) //Dif Sdo
oPrn:CmSay(nRow,16.1, TRANS(aSum[1,4],"999,999,999.99"),oFont1,,CLR_BLACK,,1) //Sdo Act
nRow := nRow + 0.4
aSum := {{0,0,0,0,0,0,0}}
ENDIF
ENDIF
IF S91->SALDOS <> 0
IF PasaCta
IF lSelSeg
(S10)->(DbSeek(STR(S91->SEGNEG,4)+S91->CUENTAS))
oPrn:CmSAY(nRow, 0.6, Ext_xNiv(LTRIM((S10)->CUENTAS)) ,oFont1)
oPrn:CmSay(nRow, 3.5, SUBS((S10)->DESCRIP,1,40) ,oFont1)
ELSE
(S08)->(DbSeek(S91->CUENTAS))
oPrn:CmSAY(nRow, 0.6, Ext_xNiv(LTRIM((S08)->CUENTAS)) ,oFont1)
oPrn:CmSay(nRow, 3.5, SUBS((S08)->DESCRIP,1,40) ,oFont1)
ENDIF
nRow := nRow + 0.4
PasaCta := .F.
ENDIF
aSum[1,1] := aSum[1,1] + S91->SALCARG // Suma Cargos
aSum[1,2] := aSum[1,2] + S91->SALCRED // Suma Abonos
aSum[1,3] := aSum[1,3] + S91->SALDOS // Suma Dif de saldos
aSum[1,4] += (S91->SALCARG - S91->SALCRED)
aTot[1,1] := aTot[1,1] + S91->SALCARG // Totaliza Cargos
aTot[1,2] := aTot[1,2] + S91->SALCRED // Totaliza Abonos
aTot[1,3] := aTot[1,3] + S91->SALDOS // Totaliza Dif Sdos
aTot[1,4] += (S91->SALCARG - S91->SALCRED)
oPrn:CmSay(nRow, 0.5, SUBS(S91->TIPO,1,2) ,oFont1,,CLR_BLACK,,2)
oPrn:CmSay(nRow, 1.4, LTRIM(STR(S91->NUMPOL,5)) ,oFont1,,,,1)
oPrn:CmSay(nRow, 1.7, DTOC(S91->FHAMOV) ,oFont1)
oPrn:CmSay(nRow, 2.9, SUBS(S91->CONCEP,1,25) ,oFont1)
oPrn:CmSay(nRow, 7.2, SUBS(S91->REFERE,1,8) ,oFont1) // Haciendo pruebas...Funcione
oPrn:CmSay(nRow,10.2, TRANS(S91->SALCARG,"@Z999,999,999.99"),oFont1,,IF(S91->SALCARG < 0,CLR_HRED,CLR_BLACK),,1) //Cargos
oPrn:CmSay(nRow,12.2, TRANS(S91->SALCRED,"@Z999,999,999.99"),oFont1,,IF(S91->SALCRED < 0,CLR_HRED,CLR_BLACK),,1) //Abonos
oPrn:CmSay(nRow,14.1, TRANS(S91->SALDOS ,"@Z999,999,999.99"),oFont1,,IF(S91->SALDOS < 0,CLR_HRED,CLR_BLACK),,1) //Dif Sdo
oPrn:CmSay(nRow,16.1, TRANS(aSum[1,4] ,"@Z999,999,999.99"),oFont1,,IF(aSum[1,4] < 0,CLR_HRED,CLR_BLACK),,1) //Sdo Act
IF EMPTY(S91->SALCRED)
oPrn:CmSay(nRow,16.2, "No provisionado" ,oFont1,)
ELSE
oPrn:CmSay(nRow,16.2, IF(S91->REG >1,LTRIM(STR(S91->REG -1))+" Provis de m谩s","") ,oFont1,)
ENDIF
nRow := nRow + 0.4
cCtas := S91->CUENTAS
ENDIF
S91->(DbSkip())
IF nRow >= 25.5
PageEnd()
PageBegin()
TitEmpresa(TitRp, oPrn, oFont1)
TitDatos(oPrn, oFont1)
nRow := 3.0
ENDIF
ENDDO
oPrn:CmSay(nRow,8.0, REPLI("-",86) ,oFont1,,CLR_BLACK,,)
nRow = nRow + 0.4
oPrn:CmSay(nRow,10.2, TRANS(aSum[1,1],"999,999,999.99"),oFont1,,CLR_BLACK,,1) //Suma Cargos
oPrn:CmSay(nRow,12.2, TRANS(aSum[1,2],"999,999,999.99"),oFont1,,CLR_BLACK,,1) //Suma Abonos
oPrn:CmSay(nRow,14.1, TRANS(aSum[1,3],"999,999,999.99"),oFont1,,CLR_BLACK,,1) //Suma Dif Sdo
oPrn:CmSay(nRow,16.1, TRANS(aSum[1,4],"999,999,999.99"),oFont1,,CLR_BLACK,,1) //Suma Sdo Act
nRow = nRow + 0.4
*oPrn:CmSay(nRow,8.0, REPLI("-",86) ,oFont1,,CLR_BLACK,,)
nRow = nRow + 0.4
oPrn:CmSay(nRow, 6.6, "Totales:" ,oFont1,)
oPrn:CmSay(nRow,10.2, TRANS(aTot[1,1],"999,999,999.99"),oFont1,,CLR_BLACK,,1) //Total Cargos
oPrn:CmSay(nRow,12.2, TRANS(aTot[1,2],"999,999,999.99"),oFont1,,CLR_BLACK,,1) //Total Abonos
oPrn:CmSay(nRow,14.1, TRANS(aTot[1,3],"999,999,999.99"),oFont1,,CLR_BLACK,,1) //Total Dif Sdo
oPrn:CmSay(nRow,16.1, TRANS(aTot[1,4],"999,999,999.99"),oFont1,,CLR_BLACK,,1) //Total Sdo Act
PageEnd()
oFont1:End()
oFont2:End()
PrintEnd()
S91->(DbCloseArea())
oGet[01]:SetFocus()
*MsgInfo("Regresa por aca,antes de cerrar pantalla de reportes???")
Mes_Per := cMesPerAct
Ano_per := cAnoPerAct
Release oPrn, oFont,oFont1, oFont2, nVer, nHor
Release S91, Ind1Tmp1, Ind1Tmp2, CreaDbf1,TitRp,CtaIni, CtaFin,PasaCta, ;
cMA_Ini, cMA_Fin,cCtas,nSegNeg,cCtSN // oText
RETURN NILSaludos .!
Atte: Adrian C. C.