psTagSubGrid=1,2,3,4,5,6
sTagSubGridAPreencher= -- count(aTmp) = 6
iLoop=0  ---  iAPreencher=10  --- count = 1
iCountAncestrais=1
1) sQrySubGrid=   select a.pPId       pFIN_Titulos_CCusto_i,
          b.pPId       pCCusto_i,
          a.fCCusto    fCCusto_i,    
          b.sCCUsto    sCCusto_i,
          a.nValPCCus  nValPCCus_i,
          cast(a.nValPCCus/100*c.nVenc as numeric(15,2)) nValMCCus_i
   from FIN_Titulos_CCusto a,
        CCusto             b,
        FIN_Titulos        c
   where a.iVer    = a.iVAt
     and a.lExc    = 0
     and a.pCCusto = b.pPId
     and b.iVer    = b.iVAt
     and a.pTFin   = c.pPId
     and c.iVer    = c.iVAt
     and a.pTFin   = {ChaveAtual_0}
   order by b.sCCUsto, psDDFChamada=1
2) sQrySubGrid=   select a.pPId       pFIN_Titulos_CCusto_i,
          b.pPId       pCCusto_i,
          a.fCCusto    fCCusto_i,    
          b.sCCUsto    sCCusto_i,
          a.nValPCCus  nValPCCus_i,
          cast(a.nValPCCus/100*c.nVenc as numeric(15,2)) nValMCCus_i
   from FIN_Titulos_CCusto a,
        CCusto             b,
        FIN_Titulos        c
   where a.iVer    = a.iVAt
     and a.lExc    = 0
     and a.pCCusto = b.pPId
     and b.iVer    = b.iVAt
     and a.pTFin   = c.pPId
     and c.iVer    = c.iVAt
     and a.pTFin   = 4654009
   order by b.sCCUsto
3) sQrySubGrid=   select a.pPId       pFIN_Titulos_CCusto_i,
          b.pPId       pCCusto_i,
          a.fCCusto    fCCusto_i,    
          b.sCCUsto    sCCusto_i,
          a.nValPCCus  nValPCCus_i,
          cast(a.nValPCCus/100*c.nVenc as numeric(15,2)) nValMCCus_i
   from FIN_Titulos_CCusto a,
        CCusto             b,
        FIN_Titulos        c
   where a.iVer    = a.iVAt
     and a.lExc    = 0
     and a.pCCusto = b.pPId
     and b.iVer    = b.iVAt
     and a.pTFin   = c.pPId
     and c.iVer    = c.iVAt
     and a.pTFin   = 4654009
   order by b.sCCUsto
4) sQrySubGrid=   select a.pPId       pFIN_Titulos_CCusto_i,
          b.pPId       pCCusto_i,
          a.fCCusto    fCCusto_i,    
          b.sCCUsto    sCCusto_i,
          a.nValPCCus  nValPCCus_i,
          cast(a.nValPCCus/100*c.nVenc as numeric(15,2)) nValMCCus_i
   from FIN_Titulos_CCusto a,
        CCusto             b,
        FIN_Titulos        c
   where a.iVer    = a.iVAt
     and a.lExc    = 0
     and a.pCCusto = b.pPId
     and b.iVer    = b.iVAt
     and a.pTFin   = c.pPId
     and c.iVer    = c.iVAt
     and a.pTFin   = 4654009
   order by b.sCCUsto
3) sQrySubGrid=   select a.pPId       pFIN_Titulos_CCusto_i,
          b.pPId       pCCusto_i,
          a.fCCusto    fCCusto_i,    
          b.sCCUsto    sCCusto_i,
          a.nValPCCus  nValPCCus_i,
          cast(a.nValPCCus/100*c.nVenc as numeric(15,2)) nValMCCus_i
   from FIN_Titulos_CCusto a,
        CCusto             b,
        FIN_Titulos        c
   where a.iVer    = a.iVAt
     and a.lExc    = 0
     and a.pCCusto = b.pPId
     and b.iVer    = b.iVAt
     and a.pTFin   = c.pPId
     and c.iVer    = c.iVAt
     and a.pTFin   = 4654009
   order by b.sCCUsto
4) sQrySubGrid=   select a.pPId       pFIN_Titulos_CCusto_i,
          b.pPId       pCCusto_i,
          a.fCCusto    fCCusto_i,    
          b.sCCUsto    sCCusto_i,
          a.nValPCCus  nValPCCus_i,
          cast(a.nValPCCus/100*c.nVenc as numeric(15,2)) nValMCCus_i
   from FIN_Titulos_CCusto a,
        CCusto             b,
        FIN_Titulos        c
   where a.iVer    = a.iVAt
     and a.lExc    = 0
     and a.pCCusto = b.pPId
     and b.iVer    = b.iVAt
     and a.pTFin   = c.pPId
     and c.iVer    = c.iVAt
     and a.pTFin   = 4654009
   order by b.sCCUsto
3) sQrySubGrid=   select a.pPId       pFIN_Titulos_CCusto_i,
          b.pPId       pCCusto_i,
          a.fCCusto    fCCusto_i,    
          b.sCCUsto    sCCusto_i,
          a.nValPCCus  nValPCCus_i,
          cast(a.nValPCCus/100*c.nVenc as numeric(15,2)) nValMCCus_i
   from FIN_Titulos_CCusto a,
        CCusto             b,
        FIN_Titulos        c
   where a.iVer    = a.iVAt
     and a.lExc    = 0
     and a.pCCusto = b.pPId
     and b.iVer    = b.iVAt
     and a.pTFin   = c.pPId
     and c.iVer    = c.iVAt
     and a.pTFin   = 4654009
   order by b.sCCUsto
4) sQrySubGrid=   select a.pPId       pFIN_Titulos_CCusto_i,
          b.pPId       pCCusto_i,
          a.fCCusto    fCCusto_i,    
          b.sCCUsto    sCCusto_i,
          a.nValPCCus  nValPCCus_i,
          cast(a.nValPCCus/100*c.nVenc as numeric(15,2)) nValMCCus_i
   from FIN_Titulos_CCusto a,
        CCusto             b,
        FIN_Titulos        c
   where a.iVer    = a.iVAt
     and a.lExc    = 0
     and a.pCCusto = b.pPId
     and b.iVer    = b.iVAt
     and a.pTFin   = c.pPId
     and c.iVer    = c.iVAt
     and a.pTFin   = 4654009
   order by b.sCCUsto
5) sQrySubGrid=   select a.pPId       pFIN_Titulos_CCusto_i,
          b.pPId       pCCusto_i,
          a.fCCusto    fCCusto_i,    
          b.sCCUsto    sCCusto_i,
          a.nValPCCus  nValPCCus_i,
          cast(a.nValPCCus/100*c.nVenc as numeric(15,2)) nValMCCus_i
   from FIN_Titulos_CCusto a,
        CCusto             b,
        FIN_Titulos        c
   where a.iVer    = a.iVAt
     and a.lExc    = 0
     and a.pCCusto = b.pPId
     and b.iVer    = b.iVAt
     and a.pTFin   = c.pPId
     and c.iVer    = c.iVAt
     and a.pTFin   = 4654009
   order by b.sCCUsto
5a) sQrySubGrid=   select a.pPId       pFIN_Titulos_CCusto_i,
          b.pPId       pCCusto_i,
          a.fCCusto    fCCusto_i,    
          b.sCCUsto    sCCusto_i,
          a.nValPCCus  nValPCCus_i,
          cast(a.nValPCCus/100*c.nVenc as numeric(15,2)) nValMCCus_i
   from FIN_Titulos_CCusto a,
        CCusto             b,
        FIN_Titulos        c
   where a.iVer    = a.iVAt
     and a.lExc    = 0
     and a.pCCusto = b.pPId
     and b.iVer    = b.iVAt
     and a.pTFin   = c.pPId
     and c.iVer    = c.iVAt
     and a.pTFin   = 4654009
   order by b.sCCUsto
5b) sQrySubGrid=   select a.pPId       pFIN_Titulos_CCusto_i,
          b.pPId       pCCusto_i,
          a.fCCusto    fCCusto_i,    
          b.sCCUsto    sCCusto_i,
          a.nValPCCus  nValPCCus_i,
          cast(a.nValPCCus/100*c.nVenc as numeric(15,2)) nValMCCus_i
   from FIN_Titulos_CCusto a,
        CCusto             b,
        FIN_Titulos        c
   where a.iVer    = a.iVAt
     and a.lExc    = 0
     and a.pCCusto = b.pPId
     and b.iVer    = b.iVAt
     and a.pTFin   = c.pPId
     and c.iVer    = c.iVAt
     and a.pTFin   = 4654009
   order by b.sCCUsto
sQrySubGrid=   select a.pPId       pFIN_Titulos_CCusto_i,
          b.pPId       pCCusto_i,
          a.fCCusto    fCCusto_i,    
          b.sCCUsto    sCCusto_i,
          a.nValPCCus  nValPCCus_i,
          cast(a.nValPCCus/100*c.nVenc as numeric(15,2)) nValMCCus_i
   from FIN_Titulos_CCusto a,
        CCusto             b,
        FIN_Titulos        c
   where a.iVer    = a.iVAt
     and a.lExc    = 0
     and a.pCCusto = b.pPId
     and b.iVer    = b.iVAt
     and a.pTFin   = c.pPId
     and c.iVer    = c.iVAt
     and a.pTFin   = 4654009
   order by b.sCCUsto
psVer=0
iCountTmpX=0
count(aLins)=17
sLin=select a.pPId       pFIN_Titulos_CCusto_i,
sCpo=pPId, sVar=pFIN_Titulos_CCusto_i
sLin=b.pPId       pCCusto_i,
sCpo=pPId, sVar=pCCusto_i
sLin=a.fCCusto    fCCusto_i,
sCpo=fCCusto, sVar=fCCusto_i
sLin=b.sCCUsto    sCCusto_i,
sCpo=sCCUsto, sVar=sCCusto_i
sLin=a.nValPCCus  nValPCCus_i,
sCpo=nValPCCus, sVar=nValPCCus_i
sLin=cast(a.nValPCCus/100*c.nVenc as numeric(15,2)) nValMCCus_i
sCpo=nVenc, sVar=nValMCCus_i
sLin=from FIN_Titulos_CCusto a,
psId=4654009, iAPreencher=10, psTagMnemTDoc=FIN_Titulos, iSubGrid=1
(1)sQrySubGrid=   select a.pPId       pFIN_Titulos_CCusto_i,
          b.pPId       pCCusto_i,
          a.fCCusto    fCCusto_i,    
          b.sCCUsto    sCCusto_i,
          a.nValPCCus  nValPCCus_i,
          cast(a.nValPCCus/100*c.nVenc as numeric(15,2)) nValMCCus_i
   from FIN_Titulos_CCusto a,
        CCusto             b,
        FIN_Titulos        c
   where a.iVer    = a.iVAt
     and a.lExc    = 0
     and a.pCCusto = b.pPId
     and b.iVer    = b.iVAt
     and a.pTFin   = c.pPId
     and c.iVer    = c.iVAt
     and a.pTFin   = 4654009
   order by b.sCCUsto
aTmp[1]=pFIN_Titulos_CCusto_i
sVar=pFIN_Titulos_CCusto_1
aTmp[0]=pPId, sVar=pFIN_Titulos_CCusto_1, kk=0, aLin[kk]=4013310
aTmp[1]=pCCusto_i
sVar=pCCusto_1
aTmp[0]=pPId, sVar=pCCusto_1, kk=1, aLin[kk]=14
aTmp[1]=fCCusto_i
sVar=fCCusto_1
aTmp[0]=fCCusto, sVar=fCCusto_1, kk=2, aLin[kk]=1
aTmp[1]=sCCusto_i
sVar=sCCusto_1
aTmp[0]=sCCUsto, sVar=sCCusto_1, kk=3, aLin[kk]=Receitas
aTmp[1]=nValPCCus_i
sVar=nValPCCus_1
aTmp[0]=nValPCCus, sVar=nValPCCus_1, kk=4, aLin[kk]=100.00000
aTmp[1]=nValMCCus_i
sVar=nValMCCus_1
aTmp[0]=nVenc, sVar=nValMCCus_1, kk=5, aLin[kk]=22046.96
iAPreencher=10
sVar=pFIN_Titulos_CCusto_2
sVar=pCCusto_2
sVar=fCCusto_2
sVar=sCCusto_2
sVar=nValPCCus_2
sVar=nValMCCus_2
sVar=pFIN_Titulos_CCusto_3
sVar=pCCusto_3
sVar=fCCusto_3
sVar=sCCusto_3
sVar=nValPCCus_3
sVar=nValMCCus_3
sVar=pFIN_Titulos_CCusto_4
sVar=pCCusto_4
sVar=fCCusto_4
sVar=sCCusto_4
sVar=nValPCCus_4
sVar=nValMCCus_4
sVar=pFIN_Titulos_CCusto_5
sVar=pCCusto_5
sVar=fCCusto_5
sVar=sCCusto_5
sVar=nValPCCus_5
sVar=nValMCCus_5
sVar=pFIN_Titulos_CCusto_6
sVar=pCCusto_6
sVar=fCCusto_6
sVar=sCCusto_6
sVar=nValPCCus_6
sVar=nValMCCus_6
sVar=pFIN_Titulos_CCusto_7
sVar=pCCusto_7
sVar=fCCusto_7
sVar=sCCusto_7
sVar=nValPCCus_7
sVar=nValMCCus_7
sVar=pFIN_Titulos_CCusto_8
sVar=pCCusto_8
sVar=fCCusto_8
sVar=sCCusto_8
sVar=nValPCCus_8
sVar=nValMCCus_8
sVar=pFIN_Titulos_CCusto_9
sVar=pCCusto_9
sVar=fCCusto_9
sVar=sCCusto_9
sVar=nValPCCus_9
sVar=nValMCCus_9
sVar=pFIN_Titulos_CCusto_10
sVar=pCCusto_10
sVar=fCCusto_10
sVar=sCCusto_10
sVar=nValPCCus_10
sVar=nValMCCus_10
sVar=pFIN_Titulos_CCusto_11
sVar=pCCusto_11
sVar=fCCusto_11
sVar=sCCusto_11
sVar=nValPCCus_11
sVar=nValMCCus_11
iTotLinSubGridPreenchidos_1=1
iLoop=1  ---  iAPreencher=10  --- count = 1
iCountAncestrais=1
1) sQrySubGrid=   select a.pPId          pFIN_Titulos_CCorrCred_i,
          g.pPId          pCCorrCred_i,
          a.fCC           fCCorrCred_i,
          g.pAgencia      pAgeCred_i,
          g.fAgencia      fAgeCred_i,
          g.sCC           sCCCred_i,
          g.sDac          sDacCred_i,
          h.sAgencia      sAgeCredNr_i,
          h.sCoringa      sAgeCred_i,
          h.pBanco        pBancoCred_i,
          h.fBanco        fBancoCred_i,
          i.sCodigo       sCodCred_i,
          i.sDescricao    sDesCred_i,
          a.nValPCCred    nValPCCred_i,
          a.nValMCCred    nValMCCred_i
   from FIN_Titulos_CC a left join CC         g  on  a.pCC          =  g.pPId  and  g.iVer  =  g.iVAt        
                         left join CUP        h  on  g.pAgencia     =  h.pPId  and  h.iVer  =  h.iVAt
                         left join Banco      i  on  h.pBanco       =  i.pPId  and  i.iVer  =  i.iVAt
   where a.iVer    = a.iVAt
     and a.lExc    = 0
     and a.pTFin   = {ChaveAtual_0}
     and a.lDeb    = 0
   order by i.sDescricao,h.sAgencia,h.sAgencia, psDDFChamada=1
2) sQrySubGrid=   select a.pPId          pFIN_Titulos_CCorrCred_i,
          g.pPId          pCCorrCred_i,
          a.fCC           fCCorrCred_i,
          g.pAgencia      pAgeCred_i,
          g.fAgencia      fAgeCred_i,
          g.sCC           sCCCred_i,
          g.sDac          sDacCred_i,
          h.sAgencia      sAgeCredNr_i,
          h.sCoringa      sAgeCred_i,
          h.pBanco        pBancoCred_i,
          h.fBanco        fBancoCred_i,
          i.sCodigo       sCodCred_i,
          i.sDescricao    sDesCred_i,
          a.nValPCCred    nValPCCred_i,
          a.nValMCCred    nValMCCred_i
   from FIN_Titulos_CC a left join CC         g  on  a.pCC          =  g.pPId  and  g.iVer  =  g.iVAt        
                         left join CUP        h  on  g.pAgencia     =  h.pPId  and  h.iVer  =  h.iVAt
                         left join Banco      i  on  h.pBanco       =  i.pPId  and  i.iVer  =  i.iVAt
   where a.iVer    = a.iVAt
     and a.lExc    = 0
     and a.pTFin   = 4654009
     and a.lDeb    = 0
   order by i.sDescricao,h.sAgencia,h.sAgencia
3) sQrySubGrid=   select a.pPId          pFIN_Titulos_CCorrCred_i,
          g.pPId          pCCorrCred_i,
          a.fCC           fCCorrCred_i,
          g.pAgencia      pAgeCred_i,
          g.fAgencia      fAgeCred_i,
          g.sCC           sCCCred_i,
          g.sDac          sDacCred_i,
          h.sAgencia      sAgeCredNr_i,
          h.sCoringa      sAgeCred_i,
          h.pBanco        pBancoCred_i,
          h.fBanco        fBancoCred_i,
          i.sCodigo       sCodCred_i,
          i.sDescricao    sDesCred_i,
          a.nValPCCred    nValPCCred_i,
          a.nValMCCred    nValMCCred_i
   from FIN_Titulos_CC a left join CC         g  on  a.pCC          =  g.pPId  and  g.iVer  =  g.iVAt        
                         left join CUP        h  on  g.pAgencia     =  h.pPId  and  h.iVer  =  h.iVAt
                         left join Banco      i  on  h.pBanco       =  i.pPId  and  i.iVer  =  i.iVAt
   where a.iVer    = a.iVAt
     and a.lExc    = 0
     and a.pTFin   = 4654009
     and a.lDeb    = 0
   order by i.sDescricao,h.sAgencia,h.sAgencia
4) sQrySubGrid=   select a.pPId          pFIN_Titulos_CCorrCred_i,
          g.pPId          pCCorrCred_i,
          a.fCC           fCCorrCred_i,
          g.pAgencia      pAgeCred_i,
          g.fAgencia      fAgeCred_i,
          g.sCC           sCCCred_i,
          g.sDac          sDacCred_i,
          h.sAgencia      sAgeCredNr_i,
          h.sCoringa      sAgeCred_i,
          h.pBanco        pBancoCred_i,
          h.fBanco        fBancoCred_i,
          i.sCodigo       sCodCred_i,
          i.sDescricao    sDesCred_i,
          a.nValPCCred    nValPCCred_i,
          a.nValMCCred    nValMCCred_i
   from FIN_Titulos_CC a left join CC         g  on  a.pCC          =  g.pPId  and  g.iVer  =  g.iVAt        
                         left join CUP        h  on  g.pAgencia     =  h.pPId  and  h.iVer  =  h.iVAt
                         left join Banco      i  on  h.pBanco       =  i.pPId  and  i.iVer  =  i.iVAt
   where a.iVer    = a.iVAt
     and a.lExc    = 0
     and a.pTFin   = 4654009
     and a.lDeb    = 0
   order by i.sDescricao,h.sAgencia,h.sAgencia
3) sQrySubGrid=   select a.pPId          pFIN_Titulos_CCorrCred_i,
          g.pPId          pCCorrCred_i,
          a.fCC           fCCorrCred_i,
          g.pAgencia      pAgeCred_i,
          g.fAgencia      fAgeCred_i,
          g.sCC           sCCCred_i,
          g.sDac          sDacCred_i,
          h.sAgencia      sAgeCredNr_i,
          h.sCoringa      sAgeCred_i,
          h.pBanco        pBancoCred_i,
          h.fBanco        fBancoCred_i,
          i.sCodigo       sCodCred_i,
          i.sDescricao    sDesCred_i,
          a.nValPCCred    nValPCCred_i,
          a.nValMCCred    nValMCCred_i
   from FIN_Titulos_CC a left join CC         g  on  a.pCC          =  g.pPId  and  g.iVer  =  g.iVAt        
                         left join CUP        h  on  g.pAgencia     =  h.pPId  and  h.iVer  =  h.iVAt
                         left join Banco      i  on  h.pBanco       =  i.pPId  and  i.iVer  =  i.iVAt
   where a.iVer    = a.iVAt
     and a.lExc    = 0
     and a.pTFin   = 4654009
     and a.lDeb    = 0
   order by i.sDescricao,h.sAgencia,h.sAgencia
4) sQrySubGrid=   select a.pPId          pFIN_Titulos_CCorrCred_i,
          g.pPId          pCCorrCred_i,
          a.fCC           fCCorrCred_i,
          g.pAgencia      pAgeCred_i,
          g.fAgencia      fAgeCred_i,
          g.sCC           sCCCred_i,
          g.sDac          sDacCred_i,
          h.sAgencia      sAgeCredNr_i,
          h.sCoringa      sAgeCred_i,
          h.pBanco        pBancoCred_i,
          h.fBanco        fBancoCred_i,
          i.sCodigo       sCodCred_i,
          i.sDescricao    sDesCred_i,
          a.nValPCCred    nValPCCred_i,
          a.nValMCCred    nValMCCred_i
   from FIN_Titulos_CC a left join CC         g  on  a.pCC          =  g.pPId  and  g.iVer  =  g.iVAt        
                         left join CUP        h  on  g.pAgencia     =  h.pPId  and  h.iVer  =  h.iVAt
                         left join Banco      i  on  h.pBanco       =  i.pPId  and  i.iVer  =  i.iVAt
   where a.iVer    = a.iVAt
     and a.lExc    = 0
     and a.pTFin   = 4654009
     and a.lDeb    = 0
   order by i.sDescricao,h.sAgencia,h.sAgencia
3) sQrySubGrid=   select a.pPId          pFIN_Titulos_CCorrCred_i,
          g.pPId          pCCorrCred_i,
          a.fCC           fCCorrCred_i,
          g.pAgencia      pAgeCred_i,
          g.fAgencia      fAgeCred_i,
          g.sCC           sCCCred_i,
          g.sDac          sDacCred_i,
          h.sAgencia      sAgeCredNr_i,
          h.sCoringa      sAgeCred_i,
          h.pBanco        pBancoCred_i,
          h.fBanco        fBancoCred_i,
          i.sCodigo       sCodCred_i,
          i.sDescricao    sDesCred_i,
          a.nValPCCred    nValPCCred_i,
          a.nValMCCred    nValMCCred_i
   from FIN_Titulos_CC a left join CC         g  on  a.pCC          =  g.pPId  and  g.iVer  =  g.iVAt        
                         left join CUP        h  on  g.pAgencia     =  h.pPId  and  h.iVer  =  h.iVAt
                         left join Banco      i  on  h.pBanco       =  i.pPId  and  i.iVer  =  i.iVAt
   where a.iVer    = a.iVAt
     and a.lExc    = 0
     and a.pTFin   = 4654009
     and a.lDeb    = 0
   order by i.sDescricao,h.sAgencia,h.sAgencia
4) sQrySubGrid=   select a.pPId          pFIN_Titulos_CCorrCred_i,
          g.pPId          pCCorrCred_i,
          a.fCC           fCCorrCred_i,
          g.pAgencia      pAgeCred_i,
          g.fAgencia      fAgeCred_i,
          g.sCC           sCCCred_i,
          g.sDac          sDacCred_i,
          h.sAgencia      sAgeCredNr_i,
          h.sCoringa      sAgeCred_i,
          h.pBanco        pBancoCred_i,
          h.fBanco        fBancoCred_i,
          i.sCodigo       sCodCred_i,
          i.sDescricao    sDesCred_i,
          a.nValPCCred    nValPCCred_i,
          a.nValMCCred    nValMCCred_i
   from FIN_Titulos_CC a left join CC         g  on  a.pCC          =  g.pPId  and  g.iVer  =  g.iVAt        
                         left join CUP        h  on  g.pAgencia     =  h.pPId  and  h.iVer  =  h.iVAt
                         left join Banco      i  on  h.pBanco       =  i.pPId  and  i.iVer  =  i.iVAt
   where a.iVer    = a.iVAt
     and a.lExc    = 0
     and a.pTFin   = 4654009
     and a.lDeb    = 0
   order by i.sDescricao,h.sAgencia,h.sAgencia
5) sQrySubGrid=   select a.pPId          pFIN_Titulos_CCorrCred_i,
          g.pPId          pCCorrCred_i,
          a.fCC           fCCorrCred_i,
          g.pAgencia      pAgeCred_i,
          g.fAgencia      fAgeCred_i,
          g.sCC           sCCCred_i,
          g.sDac          sDacCred_i,
          h.sAgencia      sAgeCredNr_i,
          h.sCoringa      sAgeCred_i,
          h.pBanco        pBancoCred_i,
          h.fBanco        fBancoCred_i,
          i.sCodigo       sCodCred_i,
          i.sDescricao    sDesCred_i,
          a.nValPCCred    nValPCCred_i,
          a.nValMCCred    nValMCCred_i
   from FIN_Titulos_CC a left join CC         g  on  a.pCC          =  g.pPId  and  g.iVer  =  g.iVAt        
                         left join CUP        h  on  g.pAgencia     =  h.pPId  and  h.iVer  =  h.iVAt
                         left join Banco      i  on  h.pBanco       =  i.pPId  and  i.iVer  =  i.iVAt
   where a.iVer    = a.iVAt
     and a.lExc    = 0
     and a.pTFin   = 4654009
     and a.lDeb    = 0
   order by i.sDescricao,h.sAgencia,h.sAgencia
5a) sQrySubGrid=   select a.pPId          pFIN_Titulos_CCorrCred_i,
          g.pPId          pCCorrCred_i,
          a.fCC           fCCorrCred_i,
          g.pAgencia      pAgeCred_i,
          g.fAgencia      fAgeCred_i,
          g.sCC           sCCCred_i,
          g.sDac          sDacCred_i,
          h.sAgencia      sAgeCredNr_i,
          h.sCoringa      sAgeCred_i,
          h.pBanco        pBancoCred_i,
          h.fBanco        fBancoCred_i,
          i.sCodigo       sCodCred_i,
          i.sDescricao    sDesCred_i,
          a.nValPCCred    nValPCCred_i,
          a.nValMCCred    nValMCCred_i
   from FIN_Titulos_CC a left join CC         g  on  a.pCC          =  g.pPId  and  g.iVer  =  g.iVAt        
                         left join CUP        h  on  g.pAgencia     =  h.pPId  and  h.iVer  =  h.iVAt
                         left join Banco      i  on  h.pBanco       =  i.pPId  and  i.iVer  =  i.iVAt
   where a.iVer    = a.iVAt
     and a.lExc    = 0
     and a.pTFin   = 4654009
     and a.lDeb    = 0
   order by i.sDescricao,h.sAgencia,h.sAgencia
5b) sQrySubGrid=   select a.pPId          pFIN_Titulos_CCorrCred_i,
          g.pPId          pCCorrCred_i,
          a.fCC           fCCorrCred_i,
          g.pAgencia      pAgeCred_i,
          g.fAgencia      fAgeCred_i,
          g.sCC           sCCCred_i,
          g.sDac          sDacCred_i,
          h.sAgencia      sAgeCredNr_i,
          h.sCoringa      sAgeCred_i,
          h.pBanco        pBancoCred_i,
          h.fBanco        fBancoCred_i,
          i.sCodigo       sCodCred_i,
          i.sDescricao    sDesCred_i,
          a.nValPCCred    nValPCCred_i,
          a.nValMCCred    nValMCCred_i
   from FIN_Titulos_CC a left join CC         g  on  a.pCC          =  g.pPId  and  g.iVer  =  g.iVAt        
                         left join CUP        h  on  g.pAgencia     =  h.pPId  and  h.iVer  =  h.iVAt
                         left join Banco      i  on  h.pBanco       =  i.pPId  and  i.iVer  =  i.iVAt
   where a.iVer    = a.iVAt
     and a.lExc    = 0
     and a.pTFin   = 4654009
     and a.lDeb    = 0
   order by i.sDescricao,h.sAgencia,h.sAgencia
sQrySubGrid=   select a.pPId          pFIN_Titulos_CCorrCred_i,
          g.pPId          pCCorrCred_i,
          a.fCC           fCCorrCred_i,
          g.pAgencia      pAgeCred_i,
          g.fAgencia      fAgeCred_i,
          g.sCC           sCCCred_i,
          g.sDac          sDacCred_i,
          h.sAgencia      sAgeCredNr_i,
          h.sCoringa      sAgeCred_i,
          h.pBanco        pBancoCred_i,
          h.fBanco        fBancoCred_i,
          i.sCodigo       sCodCred_i,
          i.sDescricao    sDesCred_i,
          a.nValPCCred    nValPCCred_i,
          a.nValMCCred    nValMCCred_i
   from FIN_Titulos_CC a left join CC         g  on  a.pCC          =  g.pPId  and  g.iVer  =  g.iVAt        
                         left join CUP        h  on  g.pAgencia     =  h.pPId  and  h.iVer  =  h.iVAt
                         left join Banco      i  on  h.pBanco       =  i.pPId  and  i.iVer  =  i.iVAt
   where a.iVer    = a.iVAt
     and a.lExc    = 0
     and a.pTFin   = 4654009
     and a.lDeb    = 0
   order by i.sDescricao,h.sAgencia,h.sAgencia
psVer=0
iCountTmpX=0
count(aLins)=23
sLin=select a.pPId          pFIN_Titulos_CCorrCred_i,
sCpo=pPId, sVar=pFIN_Titulos_CCorrCred_i
sLin=g.pPId          pCCorrCred_i,
sCpo=pPId, sVar=pCCorrCred_i
sLin=a.fCC           fCCorrCred_i,
sCpo=fCC, sVar=fCCorrCred_i
sLin=g.pAgencia      pAgeCred_i,
sCpo=pAgencia, sVar=pAgeCred_i
sLin=g.fAgencia      fAgeCred_i,
sCpo=fAgencia, sVar=fAgeCred_i
sLin=g.sCC           sCCCred_i,
sCpo=sCC, sVar=sCCCred_i
sLin=g.sDac          sDacCred_i,
sCpo=sDac, sVar=sDacCred_i
sLin=h.sAgencia      sAgeCredNr_i,
sCpo=sAgencia, sVar=sAgeCredNr_i
sLin=h.sCoringa      sAgeCred_i,
sCpo=sCoringa, sVar=sAgeCred_i
sLin=h.pBanco        pBancoCred_i,
sCpo=pBanco, sVar=pBancoCred_i
sLin=h.fBanco        fBancoCred_i,
sCpo=fBanco, sVar=fBancoCred_i
sLin=i.sCodigo       sCodCred_i,
sCpo=sCodigo, sVar=sCodCred_i
sLin=i.sDescricao    sDesCred_i,
sCpo=sDescricao, sVar=sDesCred_i
sLin=a.nValPCCred    nValPCCred_i,
sCpo=nValPCCred, sVar=nValPCCred_i
sLin=a.nValMCCred    nValMCCred_i
sCpo=nValMCCred, sVar=nValMCCred_i
sLin=from FIN_Titulos_CC a left join CC         g  on  a.pCC          =  g.pPId  and  g.iVer  =  g.iVAt
psId=4654009, iAPreencher=10, psTagMnemTDoc=FIN_Titulos, iSubGrid=2
(1)sQrySubGrid=   select a.pPId          pFIN_Titulos_CCorrCred_i,
          g.pPId          pCCorrCred_i,
          a.fCC           fCCorrCred_i,
          g.pAgencia      pAgeCred_i,
          g.fAgencia      fAgeCred_i,
          g.sCC           sCCCred_i,
          g.sDac          sDacCred_i,
          h.sAgencia      sAgeCredNr_i,
          h.sCoringa      sAgeCred_i,
          h.pBanco        pBancoCred_i,
          h.fBanco        fBancoCred_i,
          i.sCodigo       sCodCred_i,
          i.sDescricao    sDesCred_i,
          a.nValPCCred    nValPCCred_i,
          a.nValMCCred    nValMCCred_i
   from FIN_Titulos_CC a left join CC         g  on  a.pCC          =  g.pPId  and  g.iVer  =  g.iVAt        
                         left join CUP        h  on  g.pAgencia     =  h.pPId  and  h.iVer  =  h.iVAt
                         left join Banco      i  on  h.pBanco       =  i.pPId  and  i.iVer  =  i.iVAt
   where a.iVer    = a.iVAt
     and a.lExc    = 0
     and a.pTFin   = 4654009
     and a.lDeb    = 0
   order by i.sDescricao,h.sAgencia,h.sAgencia
iAPreencher=10
sVar=pFIN_Titulos_CCorrCred_1
sVar=pCCorrCred_1
sVar=fCCorrCred_1
sVar=pAgeCred_1
sVar=fAgeCred_1
sVar=sCCCred_1
sVar=sDacCred_1
sVar=sAgeCredNr_1
sVar=sAgeCred_1
sVar=pBancoCred_1
sVar=fBancoCred_1
sVar=sCodCred_1
sVar=sDesCred_1
sVar=nValPCCred_1
sVar=nValMCCred_1
sVar=pFIN_Titulos_CCorrCred_2
sVar=pCCorrCred_2
sVar=fCCorrCred_2
sVar=pAgeCred_2
sVar=fAgeCred_2
sVar=sCCCred_2
sVar=sDacCred_2
sVar=sAgeCredNr_2
sVar=sAgeCred_2
sVar=pBancoCred_2
sVar=fBancoCred_2
sVar=sCodCred_2
sVar=sDesCred_2
sVar=nValPCCred_2
sVar=nValMCCred_2
sVar=pFIN_Titulos_CCorrCred_3
sVar=pCCorrCred_3
sVar=fCCorrCred_3
sVar=pAgeCred_3
sVar=fAgeCred_3
sVar=sCCCred_3
sVar=sDacCred_3
sVar=sAgeCredNr_3
sVar=sAgeCred_3
sVar=pBancoCred_3
sVar=fBancoCred_3
sVar=sCodCred_3
sVar=sDesCred_3
sVar=nValPCCred_3
sVar=nValMCCred_3
sVar=pFIN_Titulos_CCorrCred_4
sVar=pCCorrCred_4
sVar=fCCorrCred_4
sVar=pAgeCred_4
sVar=fAgeCred_4
sVar=sCCCred_4
sVar=sDacCred_4
sVar=sAgeCredNr_4
sVar=sAgeCred_4
sVar=pBancoCred_4
sVar=fBancoCred_4
sVar=sCodCred_4
sVar=sDesCred_4
sVar=nValPCCred_4
sVar=nValMCCred_4
sVar=pFIN_Titulos_CCorrCred_5
sVar=pCCorrCred_5
sVar=fCCorrCred_5
sVar=pAgeCred_5
sVar=fAgeCred_5
sVar=sCCCred_5
sVar=sDacCred_5
sVar=sAgeCredNr_5
sVar=sAgeCred_5
sVar=pBancoCred_5
sVar=fBancoCred_5
sVar=sCodCred_5
sVar=sDesCred_5
sVar=nValPCCred_5
sVar=nValMCCred_5
sVar=pFIN_Titulos_CCorrCred_6
sVar=pCCorrCred_6
sVar=fCCorrCred_6
sVar=pAgeCred_6
sVar=fAgeCred_6
sVar=sCCCred_6
sVar=sDacCred_6
sVar=sAgeCredNr_6
sVar=sAgeCred_6
sVar=pBancoCred_6
sVar=fBancoCred_6
sVar=sCodCred_6
sVar=sDesCred_6
sVar=nValPCCred_6
sVar=nValMCCred_6
sVar=pFIN_Titulos_CCorrCred_7
sVar=pCCorrCred_7
sVar=fCCorrCred_7
sVar=pAgeCred_7
sVar=fAgeCred_7
sVar=sCCCred_7
sVar=sDacCred_7
sVar=sAgeCredNr_7
sVar=sAgeCred_7
sVar=pBancoCred_7
sVar=fBancoCred_7
sVar=sCodCred_7
sVar=sDesCred_7
sVar=nValPCCred_7
sVar=nValMCCred_7
sVar=pFIN_Titulos_CCorrCred_8
sVar=pCCorrCred_8
sVar=fCCorrCred_8
sVar=pAgeCred_8
sVar=fAgeCred_8
sVar=sCCCred_8
sVar=sDacCred_8
sVar=sAgeCredNr_8
sVar=sAgeCred_8
sVar=pBancoCred_8
sVar=fBancoCred_8
sVar=sCodCred_8
sVar=sDesCred_8
sVar=nValPCCred_8
sVar=nValMCCred_8
sVar=pFIN_Titulos_CCorrCred_9
sVar=pCCorrCred_9
sVar=fCCorrCred_9
sVar=pAgeCred_9
sVar=fAgeCred_9
sVar=sCCCred_9
sVar=sDacCred_9
sVar=sAgeCredNr_9
sVar=sAgeCred_9
sVar=pBancoCred_9
sVar=fBancoCred_9
sVar=sCodCred_9
sVar=sDesCred_9
sVar=nValPCCred_9
sVar=nValMCCred_9
sVar=pFIN_Titulos_CCorrCred_10
sVar=pCCorrCred_10
sVar=fCCorrCred_10
sVar=pAgeCred_10
sVar=fAgeCred_10
sVar=sCCCred_10
sVar=sDacCred_10
sVar=sAgeCredNr_10
sVar=sAgeCred_10
sVar=pBancoCred_10
sVar=fBancoCred_10
sVar=sCodCred_10
sVar=sDesCred_10
sVar=nValPCCred_10
sVar=nValMCCred_10
iTotLinSubGridPreenchidos_2=0
iLoop=2  ---  iAPreencher=10  --- count = 1
iCountAncestrais=1
1) sQrySubGrid=   select a.pPId         pFIN_Titulos_CCorrDeb_i,
          g.pPId         pCCorrDeb_i,
          a.fCC          fCCorrDeb_i,
          g.pAgencia     pAgeDeb_i,
          g.fAgencia     fAgeDeb_i,
          g.sCC          sCCDeb_i,
          g.sDac         sDacDeb_i,
          h.sAgencia     sAgeDebNr_i,
          h.sCoringa     sAgeDeb_i,
          h.pBanco       pBancoDeb_i,
          h.fBanco       fBancoDeb_i,
          i.sCodigo      sCodDeb_i,
          i.sDescricao   sDesDeb_i,
          a.nValPCCDeb   nValPCCDeb_i,
          a.nValMCCDeb   nValMCCDeb_i
   from FIN_Titulos_CC a left join CC         g  on  a.pCC         =  g.pPId  and  g.iVer  = g.iVAt
                         left join CUP        h  on  g.pAgencia    =  h.pPId  and  h.iVer  = h.iVAt
                         left join Banco      i  on  h.pBanco      =  i.pPId  and  i.iVer  = i.iVAt
   where a.iVer    = a.iVAt
     and a.lExc    = 0
     and a.pTFin   = {ChaveAtual_0}
     and a.lDeb    = 1
   order by i.sDescricao,h.sAgencia,h.sAgencia, psDDFChamada=1
2) sQrySubGrid=   select a.pPId         pFIN_Titulos_CCorrDeb_i,
          g.pPId         pCCorrDeb_i,
          a.fCC          fCCorrDeb_i,
          g.pAgencia     pAgeDeb_i,
          g.fAgencia     fAgeDeb_i,
          g.sCC          sCCDeb_i,
          g.sDac         sDacDeb_i,
          h.sAgencia     sAgeDebNr_i,
          h.sCoringa     sAgeDeb_i,
          h.pBanco       pBancoDeb_i,
          h.fBanco       fBancoDeb_i,
          i.sCodigo      sCodDeb_i,
          i.sDescricao   sDesDeb_i,
          a.nValPCCDeb   nValPCCDeb_i,
          a.nValMCCDeb   nValMCCDeb_i
   from FIN_Titulos_CC a left join CC         g  on  a.pCC         =  g.pPId  and  g.iVer  = g.iVAt
                         left join CUP        h  on  g.pAgencia    =  h.pPId  and  h.iVer  = h.iVAt
                         left join Banco      i  on  h.pBanco      =  i.pPId  and  i.iVer  = i.iVAt
   where a.iVer    = a.iVAt
     and a.lExc    = 0
     and a.pTFin   = 4654009
     and a.lDeb    = 1
   order by i.sDescricao,h.sAgencia,h.sAgencia
3) sQrySubGrid=   select a.pPId         pFIN_Titulos_CCorrDeb_i,
          g.pPId         pCCorrDeb_i,
          a.fCC          fCCorrDeb_i,
          g.pAgencia     pAgeDeb_i,
          g.fAgencia     fAgeDeb_i,
          g.sCC          sCCDeb_i,
          g.sDac         sDacDeb_i,
          h.sAgencia     sAgeDebNr_i,
          h.sCoringa     sAgeDeb_i,
          h.pBanco       pBancoDeb_i,
          h.fBanco       fBancoDeb_i,
          i.sCodigo      sCodDeb_i,
          i.sDescricao   sDesDeb_i,
          a.nValPCCDeb   nValPCCDeb_i,
          a.nValMCCDeb   nValMCCDeb_i
   from FIN_Titulos_CC a left join CC         g  on  a.pCC         =  g.pPId  and  g.iVer  = g.iVAt
                         left join CUP        h  on  g.pAgencia    =  h.pPId  and  h.iVer  = h.iVAt
                         left join Banco      i  on  h.pBanco      =  i.pPId  and  i.iVer  = i.iVAt
   where a.iVer    = a.iVAt
     and a.lExc    = 0
     and a.pTFin   = 4654009
     and a.lDeb    = 1
   order by i.sDescricao,h.sAgencia,h.sAgencia
4) sQrySubGrid=   select a.pPId         pFIN_Titulos_CCorrDeb_i,
          g.pPId         pCCorrDeb_i,
          a.fCC          fCCorrDeb_i,
          g.pAgencia     pAgeDeb_i,
          g.fAgencia     fAgeDeb_i,
          g.sCC          sCCDeb_i,
          g.sDac         sDacDeb_i,
          h.sAgencia     sAgeDebNr_i,
          h.sCoringa     sAgeDeb_i,
          h.pBanco       pBancoDeb_i,
          h.fBanco       fBancoDeb_i,
          i.sCodigo      sCodDeb_i,
          i.sDescricao   sDesDeb_i,
          a.nValPCCDeb   nValPCCDeb_i,
          a.nValMCCDeb   nValMCCDeb_i
   from FIN_Titulos_CC a left join CC         g  on  a.pCC         =  g.pPId  and  g.iVer  = g.iVAt
                         left join CUP        h  on  g.pAgencia    =  h.pPId  and  h.iVer  = h.iVAt
                         left join Banco      i  on  h.pBanco      =  i.pPId  and  i.iVer  = i.iVAt
   where a.iVer    = a.iVAt
     and a.lExc    = 0
     and a.pTFin   = 4654009
     and a.lDeb    = 1
   order by i.sDescricao,h.sAgencia,h.sAgencia
3) sQrySubGrid=   select a.pPId         pFIN_Titulos_CCorrDeb_i,
          g.pPId         pCCorrDeb_i,
          a.fCC          fCCorrDeb_i,
          g.pAgencia     pAgeDeb_i,
          g.fAgencia     fAgeDeb_i,
          g.sCC          sCCDeb_i,
          g.sDac         sDacDeb_i,
          h.sAgencia     sAgeDebNr_i,
          h.sCoringa     sAgeDeb_i,
          h.pBanco       pBancoDeb_i,
          h.fBanco       fBancoDeb_i,
          i.sCodigo      sCodDeb_i,
          i.sDescricao   sDesDeb_i,
          a.nValPCCDeb   nValPCCDeb_i,
          a.nValMCCDeb   nValMCCDeb_i
   from FIN_Titulos_CC a left join CC         g  on  a.pCC         =  g.pPId  and  g.iVer  = g.iVAt
                         left join CUP        h  on  g.pAgencia    =  h.pPId  and  h.iVer  = h.iVAt
                         left join Banco      i  on  h.pBanco      =  i.pPId  and  i.iVer  = i.iVAt
   where a.iVer    = a.iVAt
     and a.lExc    = 0
     and a.pTFin   = 4654009
     and a.lDeb    = 1
   order by i.sDescricao,h.sAgencia,h.sAgencia
4) sQrySubGrid=   select a.pPId         pFIN_Titulos_CCorrDeb_i,
          g.pPId         pCCorrDeb_i,
          a.fCC          fCCorrDeb_i,
          g.pAgencia     pAgeDeb_i,
          g.fAgencia     fAgeDeb_i,
          g.sCC          sCCDeb_i,
          g.sDac         sDacDeb_i,
          h.sAgencia     sAgeDebNr_i,
          h.sCoringa     sAgeDeb_i,
          h.pBanco       pBancoDeb_i,
          h.fBanco       fBancoDeb_i,
          i.sCodigo      sCodDeb_i,
          i.sDescricao   sDesDeb_i,
          a.nValPCCDeb   nValPCCDeb_i,
          a.nValMCCDeb   nValMCCDeb_i
   from FIN_Titulos_CC a left join CC         g  on  a.pCC         =  g.pPId  and  g.iVer  = g.iVAt
                         left join CUP        h  on  g.pAgencia    =  h.pPId  and  h.iVer  = h.iVAt
                         left join Banco      i  on  h.pBanco      =  i.pPId  and  i.iVer  = i.iVAt
   where a.iVer    = a.iVAt
     and a.lExc    = 0
     and a.pTFin   = 4654009
     and a.lDeb    = 1
   order by i.sDescricao,h.sAgencia,h.sAgencia
3) sQrySubGrid=   select a.pPId         pFIN_Titulos_CCorrDeb_i,
          g.pPId         pCCorrDeb_i,
          a.fCC          fCCorrDeb_i,
          g.pAgencia     pAgeDeb_i,
          g.fAgencia     fAgeDeb_i,
          g.sCC          sCCDeb_i,
          g.sDac         sDacDeb_i,
          h.sAgencia     sAgeDebNr_i,
          h.sCoringa     sAgeDeb_i,
          h.pBanco       pBancoDeb_i,
          h.fBanco       fBancoDeb_i,
          i.sCodigo      sCodDeb_i,
          i.sDescricao   sDesDeb_i,
          a.nValPCCDeb   nValPCCDeb_i,
          a.nValMCCDeb   nValMCCDeb_i
   from FIN_Titulos_CC a left join CC         g  on  a.pCC         =  g.pPId  and  g.iVer  = g.iVAt
                         left join CUP        h  on  g.pAgencia    =  h.pPId  and  h.iVer  = h.iVAt
                         left join Banco      i  on  h.pBanco      =  i.pPId  and  i.iVer  = i.iVAt
   where a.iVer    = a.iVAt
     and a.lExc    = 0
     and a.pTFin   = 4654009
     and a.lDeb    = 1
   order by i.sDescricao,h.sAgencia,h.sAgencia
4) sQrySubGrid=   select a.pPId         pFIN_Titulos_CCorrDeb_i,
          g.pPId         pCCorrDeb_i,
          a.fCC          fCCorrDeb_i,
          g.pAgencia     pAgeDeb_i,
          g.fAgencia     fAgeDeb_i,
          g.sCC          sCCDeb_i,
          g.sDac         sDacDeb_i,
          h.sAgencia     sAgeDebNr_i,
          h.sCoringa     sAgeDeb_i,
          h.pBanco       pBancoDeb_i,
          h.fBanco       fBancoDeb_i,
          i.sCodigo      sCodDeb_i,
          i.sDescricao   sDesDeb_i,
          a.nValPCCDeb   nValPCCDeb_i,
          a.nValMCCDeb   nValMCCDeb_i
   from FIN_Titulos_CC a left join CC         g  on  a.pCC         =  g.pPId  and  g.iVer  = g.iVAt
                         left join CUP        h  on  g.pAgencia    =  h.pPId  and  h.iVer  = h.iVAt
                         left join Banco      i  on  h.pBanco      =  i.pPId  and  i.iVer  = i.iVAt
   where a.iVer    = a.iVAt
     and a.lExc    = 0
     and a.pTFin   = 4654009
     and a.lDeb    = 1
   order by i.sDescricao,h.sAgencia,h.sAgencia
5) sQrySubGrid=   select a.pPId         pFIN_Titulos_CCorrDeb_i,
          g.pPId         pCCorrDeb_i,
          a.fCC          fCCorrDeb_i,
          g.pAgencia     pAgeDeb_i,
          g.fAgencia     fAgeDeb_i,
          g.sCC          sCCDeb_i,
          g.sDac         sDacDeb_i,
          h.sAgencia     sAgeDebNr_i,
          h.sCoringa     sAgeDeb_i,
          h.pBanco       pBancoDeb_i,
          h.fBanco       fBancoDeb_i,
          i.sCodigo      sCodDeb_i,
          i.sDescricao   sDesDeb_i,
          a.nValPCCDeb   nValPCCDeb_i,
          a.nValMCCDeb   nValMCCDeb_i
   from FIN_Titulos_CC a left join CC         g  on  a.pCC         =  g.pPId  and  g.iVer  = g.iVAt
                         left join CUP        h  on  g.pAgencia    =  h.pPId  and  h.iVer  = h.iVAt
                         left join Banco      i  on  h.pBanco      =  i.pPId  and  i.iVer  = i.iVAt
   where a.iVer    = a.iVAt
     and a.lExc    = 0
     and a.pTFin   = 4654009
     and a.lDeb    = 1
   order by i.sDescricao,h.sAgencia,h.sAgencia
5a) sQrySubGrid=   select a.pPId         pFIN_Titulos_CCorrDeb_i,
          g.pPId         pCCorrDeb_i,
          a.fCC          fCCorrDeb_i,
          g.pAgencia     pAgeDeb_i,
          g.fAgencia     fAgeDeb_i,
          g.sCC          sCCDeb_i,
          g.sDac         sDacDeb_i,
          h.sAgencia     sAgeDebNr_i,
          h.sCoringa     sAgeDeb_i,
          h.pBanco       pBancoDeb_i,
          h.fBanco       fBancoDeb_i,
          i.sCodigo      sCodDeb_i,
          i.sDescricao   sDesDeb_i,
          a.nValPCCDeb   nValPCCDeb_i,
          a.nValMCCDeb   nValMCCDeb_i
   from FIN_Titulos_CC a left join CC         g  on  a.pCC         =  g.pPId  and  g.iVer  = g.iVAt
                         left join CUP        h  on  g.pAgencia    =  h.pPId  and  h.iVer  = h.iVAt
                         left join Banco      i  on  h.pBanco      =  i.pPId  and  i.iVer  = i.iVAt
   where a.iVer    = a.iVAt
     and a.lExc    = 0
     and a.pTFin   = 4654009
     and a.lDeb    = 1
   order by i.sDescricao,h.sAgencia,h.sAgencia
5b) sQrySubGrid=   select a.pPId         pFIN_Titulos_CCorrDeb_i,
          g.pPId         pCCorrDeb_i,
          a.fCC          fCCorrDeb_i,
          g.pAgencia     pAgeDeb_i,
          g.fAgencia     fAgeDeb_i,
          g.sCC          sCCDeb_i,
          g.sDac         sDacDeb_i,
          h.sAgencia     sAgeDebNr_i,
          h.sCoringa     sAgeDeb_i,
          h.pBanco       pBancoDeb_i,
          h.fBanco       fBancoDeb_i,
          i.sCodigo      sCodDeb_i,
          i.sDescricao   sDesDeb_i,
          a.nValPCCDeb   nValPCCDeb_i,
          a.nValMCCDeb   nValMCCDeb_i
   from FIN_Titulos_CC a left join CC         g  on  a.pCC         =  g.pPId  and  g.iVer  = g.iVAt
                         left join CUP        h  on  g.pAgencia    =  h.pPId  and  h.iVer  = h.iVAt
                         left join Banco      i  on  h.pBanco      =  i.pPId  and  i.iVer  = i.iVAt
   where a.iVer    = a.iVAt
     and a.lExc    = 0
     and a.pTFin   = 4654009
     and a.lDeb    = 1
   order by i.sDescricao,h.sAgencia,h.sAgencia
sQrySubGrid=   select a.pPId         pFIN_Titulos_CCorrDeb_i,
          g.pPId         pCCorrDeb_i,
          a.fCC          fCCorrDeb_i,
          g.pAgencia     pAgeDeb_i,
          g.fAgencia     fAgeDeb_i,
          g.sCC          sCCDeb_i,
          g.sDac         sDacDeb_i,
          h.sAgencia     sAgeDebNr_i,
          h.sCoringa     sAgeDeb_i,
          h.pBanco       pBancoDeb_i,
          h.fBanco       fBancoDeb_i,
          i.sCodigo      sCodDeb_i,
          i.sDescricao   sDesDeb_i,
          a.nValPCCDeb   nValPCCDeb_i,
          a.nValMCCDeb   nValMCCDeb_i
   from FIN_Titulos_CC a left join CC         g  on  a.pCC         =  g.pPId  and  g.iVer  = g.iVAt
                         left join CUP        h  on  g.pAgencia    =  h.pPId  and  h.iVer  = h.iVAt
                         left join Banco      i  on  h.pBanco      =  i.pPId  and  i.iVer  = i.iVAt
   where a.iVer    = a.iVAt
     and a.lExc    = 0
     and a.pTFin   = 4654009
     and a.lDeb    = 1
   order by i.sDescricao,h.sAgencia,h.sAgencia
psVer=0
iCountTmpX=0
count(aLins)=23
sLin=select a.pPId         pFIN_Titulos_CCorrDeb_i,
sCpo=pPId, sVar=pFIN_Titulos_CCorrDeb_i
sLin=g.pPId         pCCorrDeb_i,
sCpo=pPId, sVar=pCCorrDeb_i
sLin=a.fCC          fCCorrDeb_i,
sCpo=fCC, sVar=fCCorrDeb_i
sLin=g.pAgencia     pAgeDeb_i,
sCpo=pAgencia, sVar=pAgeDeb_i
sLin=g.fAgencia     fAgeDeb_i,
sCpo=fAgencia, sVar=fAgeDeb_i
sLin=g.sCC          sCCDeb_i,
sCpo=sCC, sVar=sCCDeb_i
sLin=g.sDac         sDacDeb_i,
sCpo=sDac, sVar=sDacDeb_i
sLin=h.sAgencia     sAgeDebNr_i,
sCpo=sAgencia, sVar=sAgeDebNr_i
sLin=h.sCoringa     sAgeDeb_i,
sCpo=sCoringa, sVar=sAgeDeb_i
sLin=h.pBanco       pBancoDeb_i,
sCpo=pBanco, sVar=pBancoDeb_i
sLin=h.fBanco       fBancoDeb_i,
sCpo=fBanco, sVar=fBancoDeb_i
sLin=i.sCodigo      sCodDeb_i,
sCpo=sCodigo, sVar=sCodDeb_i
sLin=i.sDescricao   sDesDeb_i,
sCpo=sDescricao, sVar=sDesDeb_i
sLin=a.nValPCCDeb   nValPCCDeb_i,
sCpo=nValPCCDeb, sVar=nValPCCDeb_i
sLin=a.nValMCCDeb   nValMCCDeb_i
sCpo=nValMCCDeb, sVar=nValMCCDeb_i
sLin=from FIN_Titulos_CC a left join CC         g  on  a.pCC         =  g.pPId  and  g.iVer  = g.iVAt
psId=4654009, iAPreencher=10, psTagMnemTDoc=FIN_Titulos, iSubGrid=3
(1)sQrySubGrid=   select a.pPId         pFIN_Titulos_CCorrDeb_i,
          g.pPId         pCCorrDeb_i,
          a.fCC          fCCorrDeb_i,
          g.pAgencia     pAgeDeb_i,
          g.fAgencia     fAgeDeb_i,
          g.sCC          sCCDeb_i,
          g.sDac         sDacDeb_i,
          h.sAgencia     sAgeDebNr_i,
          h.sCoringa     sAgeDeb_i,
          h.pBanco       pBancoDeb_i,
          h.fBanco       fBancoDeb_i,
          i.sCodigo      sCodDeb_i,
          i.sDescricao   sDesDeb_i,
          a.nValPCCDeb   nValPCCDeb_i,
          a.nValMCCDeb   nValMCCDeb_i
   from FIN_Titulos_CC a left join CC         g  on  a.pCC         =  g.pPId  and  g.iVer  = g.iVAt
                         left join CUP        h  on  g.pAgencia    =  h.pPId  and  h.iVer  = h.iVAt
                         left join Banco      i  on  h.pBanco      =  i.pPId  and  i.iVer  = i.iVAt
   where a.iVer    = a.iVAt
     and a.lExc    = 0
     and a.pTFin   = 4654009
     and a.lDeb    = 1
   order by i.sDescricao,h.sAgencia,h.sAgencia
iAPreencher=10
sVar=pFIN_Titulos_CCorrDeb_1
sVar=pCCorrDeb_1
sVar=fCCorrDeb_1
sVar=pAgeDeb_1
sVar=fAgeDeb_1
sVar=sCCDeb_1
sVar=sDacDeb_1
sVar=sAgeDebNr_1
sVar=sAgeDeb_1
sVar=pBancoDeb_1
sVar=fBancoDeb_1
sVar=sCodDeb_1
sVar=sDesDeb_1
sVar=nValPCCDeb_1
sVar=nValMCCDeb_1
sVar=pFIN_Titulos_CCorrDeb_2
sVar=pCCorrDeb_2
sVar=fCCorrDeb_2
sVar=pAgeDeb_2
sVar=fAgeDeb_2
sVar=sCCDeb_2
sVar=sDacDeb_2
sVar=sAgeDebNr_2
sVar=sAgeDeb_2
sVar=pBancoDeb_2
sVar=fBancoDeb_2
sVar=sCodDeb_2
sVar=sDesDeb_2
sVar=nValPCCDeb_2
sVar=nValMCCDeb_2
sVar=pFIN_Titulos_CCorrDeb_3
sVar=pCCorrDeb_3
sVar=fCCorrDeb_3
sVar=pAgeDeb_3
sVar=fAgeDeb_3
sVar=sCCDeb_3
sVar=sDacDeb_3
sVar=sAgeDebNr_3
sVar=sAgeDeb_3
sVar=pBancoDeb_3
sVar=fBancoDeb_3
sVar=sCodDeb_3
sVar=sDesDeb_3
sVar=nValPCCDeb_3
sVar=nValMCCDeb_3
sVar=pFIN_Titulos_CCorrDeb_4
sVar=pCCorrDeb_4
sVar=fCCorrDeb_4
sVar=pAgeDeb_4
sVar=fAgeDeb_4
sVar=sCCDeb_4
sVar=sDacDeb_4
sVar=sAgeDebNr_4
sVar=sAgeDeb_4
sVar=pBancoDeb_4
sVar=fBancoDeb_4
sVar=sCodDeb_4
sVar=sDesDeb_4
sVar=nValPCCDeb_4
sVar=nValMCCDeb_4
sVar=pFIN_Titulos_CCorrDeb_5
sVar=pCCorrDeb_5
sVar=fCCorrDeb_5
sVar=pAgeDeb_5
sVar=fAgeDeb_5
sVar=sCCDeb_5
sVar=sDacDeb_5
sVar=sAgeDebNr_5
sVar=sAgeDeb_5
sVar=pBancoDeb_5
sVar=fBancoDeb_5
sVar=sCodDeb_5
sVar=sDesDeb_5
sVar=nValPCCDeb_5
sVar=nValMCCDeb_5
sVar=pFIN_Titulos_CCorrDeb_6
sVar=pCCorrDeb_6
sVar=fCCorrDeb_6
sVar=pAgeDeb_6
sVar=fAgeDeb_6
sVar=sCCDeb_6
sVar=sDacDeb_6
sVar=sAgeDebNr_6
sVar=sAgeDeb_6
sVar=pBancoDeb_6
sVar=fBancoDeb_6
sVar=sCodDeb_6
sVar=sDesDeb_6
sVar=nValPCCDeb_6
sVar=nValMCCDeb_6
sVar=pFIN_Titulos_CCorrDeb_7
sVar=pCCorrDeb_7
sVar=fCCorrDeb_7
sVar=pAgeDeb_7
sVar=fAgeDeb_7
sVar=sCCDeb_7
sVar=sDacDeb_7
sVar=sAgeDebNr_7
sVar=sAgeDeb_7
sVar=pBancoDeb_7
sVar=fBancoDeb_7
sVar=sCodDeb_7
sVar=sDesDeb_7
sVar=nValPCCDeb_7
sVar=nValMCCDeb_7
sVar=pFIN_Titulos_CCorrDeb_8
sVar=pCCorrDeb_8
sVar=fCCorrDeb_8
sVar=pAgeDeb_8
sVar=fAgeDeb_8
sVar=sCCDeb_8
sVar=sDacDeb_8
sVar=sAgeDebNr_8
sVar=sAgeDeb_8
sVar=pBancoDeb_8
sVar=fBancoDeb_8
sVar=sCodDeb_8
sVar=sDesDeb_8
sVar=nValPCCDeb_8
sVar=nValMCCDeb_8
sVar=pFIN_Titulos_CCorrDeb_9
sVar=pCCorrDeb_9
sVar=fCCorrDeb_9
sVar=pAgeDeb_9
sVar=fAgeDeb_9
sVar=sCCDeb_9
sVar=sDacDeb_9
sVar=sAgeDebNr_9
sVar=sAgeDeb_9
sVar=pBancoDeb_9
sVar=fBancoDeb_9
sVar=sCodDeb_9
sVar=sDesDeb_9
sVar=nValPCCDeb_9
sVar=nValMCCDeb_9
sVar=pFIN_Titulos_CCorrDeb_10
sVar=pCCorrDeb_10
sVar=fCCorrDeb_10
sVar=pAgeDeb_10
sVar=fAgeDeb_10
sVar=sCCDeb_10
sVar=sDacDeb_10
sVar=sAgeDebNr_10
sVar=sAgeDeb_10
sVar=pBancoDeb_10
sVar=fBancoDeb_10
sVar=sCodDeb_10
sVar=sDesDeb_10
sVar=nValPCCDeb_10
sVar=nValMCCDeb_10
iTotLinSubGridPreenchidos_3=0
iLoop=3  ---  iAPreencher=10  --- count = 1
iCountAncestrais=1
1) sQrySubGrid=   select a.pPId          pFIN_Titulos_CContCred_i,
          e.pPId          pCContCred_i,
          a.fCPla         fCContCred_i,
          e.sCodigo       sCodCredPla_i,
          e.sDescricao    sDesCredPla_i,
          a.nValPCContC   nValPCContC_i,
          cast(a.nValPCContC/100*c.nVenc as numeric(15,2)) nValMCContC_i
   from FIN_Titulos_CContabil a join PlaConta e on a.pCPla = e.pPId and e.iVer = a.fCPla,
        FIN_Titulos           c
   where a.iVer    = a.iVAt
     and a.lExc    = 0
     and a.pTFin   = c.pPId
     and c.iVer    = c.iVAt
     and a.pTFin   = {ChaveAtual_0}
     and a.lDeb    = 0
   order by e.sCodigo,e.sDescricao, psDDFChamada=1
2) sQrySubGrid=   select a.pPId          pFIN_Titulos_CContCred_i,
          e.pPId          pCContCred_i,
          a.fCPla         fCContCred_i,
          e.sCodigo       sCodCredPla_i,
          e.sDescricao    sDesCredPla_i,
          a.nValPCContC   nValPCContC_i,
          cast(a.nValPCContC/100*c.nVenc as numeric(15,2)) nValMCContC_i
   from FIN_Titulos_CContabil a join PlaConta e on a.pCPla = e.pPId and e.iVer = a.fCPla,
        FIN_Titulos           c
   where a.iVer    = a.iVAt
     and a.lExc    = 0
     and a.pTFin   = c.pPId
     and c.iVer    = c.iVAt
     and a.pTFin   = 4654009
     and a.lDeb    = 0
   order by e.sCodigo,e.sDescricao
3) sQrySubGrid=   select a.pPId          pFIN_Titulos_CContCred_i,
          e.pPId          pCContCred_i,
          a.fCPla         fCContCred_i,
          e.sCodigo       sCodCredPla_i,
          e.sDescricao    sDesCredPla_i,
          a.nValPCContC   nValPCContC_i,
          cast(a.nValPCContC/100*c.nVenc as numeric(15,2)) nValMCContC_i
   from FIN_Titulos_CContabil a join PlaConta e on a.pCPla = e.pPId and e.iVer = a.fCPla,
        FIN_Titulos           c
   where a.iVer    = a.iVAt
     and a.lExc    = 0
     and a.pTFin   = c.pPId
     and c.iVer    = c.iVAt
     and a.pTFin   = 4654009
     and a.lDeb    = 0
   order by e.sCodigo,e.sDescricao
4) sQrySubGrid=   select a.pPId          pFIN_Titulos_CContCred_i,
          e.pPId          pCContCred_i,
          a.fCPla         fCContCred_i,
          e.sCodigo       sCodCredPla_i,
          e.sDescricao    sDesCredPla_i,
          a.nValPCContC   nValPCContC_i,
          cast(a.nValPCContC/100*c.nVenc as numeric(15,2)) nValMCContC_i
   from FIN_Titulos_CContabil a join PlaConta e on a.pCPla = e.pPId and e.iVer = a.fCPla,
        FIN_Titulos           c
   where a.iVer    = a.iVAt
     and a.lExc    = 0
     and a.pTFin   = c.pPId
     and c.iVer    = c.iVAt
     and a.pTFin   = 4654009
     and a.lDeb    = 0
   order by e.sCodigo,e.sDescricao
3) sQrySubGrid=   select a.pPId          pFIN_Titulos_CContCred_i,
          e.pPId          pCContCred_i,
          a.fCPla         fCContCred_i,
          e.sCodigo       sCodCredPla_i,
          e.sDescricao    sDesCredPla_i,
          a.nValPCContC   nValPCContC_i,
          cast(a.nValPCContC/100*c.nVenc as numeric(15,2)) nValMCContC_i
   from FIN_Titulos_CContabil a join PlaConta e on a.pCPla = e.pPId and e.iVer = a.fCPla,
        FIN_Titulos           c
   where a.iVer    = a.iVAt
     and a.lExc    = 0
     and a.pTFin   = c.pPId
     and c.iVer    = c.iVAt
     and a.pTFin   = 4654009
     and a.lDeb    = 0
   order by e.sCodigo,e.sDescricao
4) sQrySubGrid=   select a.pPId          pFIN_Titulos_CContCred_i,
          e.pPId          pCContCred_i,
          a.fCPla         fCContCred_i,
          e.sCodigo       sCodCredPla_i,
          e.sDescricao    sDesCredPla_i,
          a.nValPCContC   nValPCContC_i,
          cast(a.nValPCContC/100*c.nVenc as numeric(15,2)) nValMCContC_i
   from FIN_Titulos_CContabil a join PlaConta e on a.pCPla = e.pPId and e.iVer = a.fCPla,
        FIN_Titulos           c
   where a.iVer    = a.iVAt
     and a.lExc    = 0
     and a.pTFin   = c.pPId
     and c.iVer    = c.iVAt
     and a.pTFin   = 4654009
     and a.lDeb    = 0
   order by e.sCodigo,e.sDescricao
3) sQrySubGrid=   select a.pPId          pFIN_Titulos_CContCred_i,
          e.pPId          pCContCred_i,
          a.fCPla         fCContCred_i,
          e.sCodigo       sCodCredPla_i,
          e.sDescricao    sDesCredPla_i,
          a.nValPCContC   nValPCContC_i,
          cast(a.nValPCContC/100*c.nVenc as numeric(15,2)) nValMCContC_i
   from FIN_Titulos_CContabil a join PlaConta e on a.pCPla = e.pPId and e.iVer = a.fCPla,
        FIN_Titulos           c
   where a.iVer    = a.iVAt
     and a.lExc    = 0
     and a.pTFin   = c.pPId
     and c.iVer    = c.iVAt
     and a.pTFin   = 4654009
     and a.lDeb    = 0
   order by e.sCodigo,e.sDescricao
4) sQrySubGrid=   select a.pPId          pFIN_Titulos_CContCred_i,
          e.pPId          pCContCred_i,
          a.fCPla         fCContCred_i,
          e.sCodigo       sCodCredPla_i,
          e.sDescricao    sDesCredPla_i,
          a.nValPCContC   nValPCContC_i,
          cast(a.nValPCContC/100*c.nVenc as numeric(15,2)) nValMCContC_i
   from FIN_Titulos_CContabil a join PlaConta e on a.pCPla = e.pPId and e.iVer = a.fCPla,
        FIN_Titulos           c
   where a.iVer    = a.iVAt
     and a.lExc    = 0
     and a.pTFin   = c.pPId
     and c.iVer    = c.iVAt
     and a.pTFin   = 4654009
     and a.lDeb    = 0
   order by e.sCodigo,e.sDescricao
5) sQrySubGrid=   select a.pPId          pFIN_Titulos_CContCred_i,
          e.pPId          pCContCred_i,
          a.fCPla         fCContCred_i,
          e.sCodigo       sCodCredPla_i,
          e.sDescricao    sDesCredPla_i,
          a.nValPCContC   nValPCContC_i,
          cast(a.nValPCContC/100*c.nVenc as numeric(15,2)) nValMCContC_i
   from FIN_Titulos_CContabil a join PlaConta e on a.pCPla = e.pPId and e.iVer = a.fCPla,
        FIN_Titulos           c
   where a.iVer    = a.iVAt
     and a.lExc    = 0
     and a.pTFin   = c.pPId
     and c.iVer    = c.iVAt
     and a.pTFin   = 4654009
     and a.lDeb    = 0
   order by e.sCodigo,e.sDescricao
5a) sQrySubGrid=   select a.pPId          pFIN_Titulos_CContCred_i,
          e.pPId          pCContCred_i,
          a.fCPla         fCContCred_i,
          e.sCodigo       sCodCredPla_i,
          e.sDescricao    sDesCredPla_i,
          a.nValPCContC   nValPCContC_i,
          cast(a.nValPCContC/100*c.nVenc as numeric(15,2)) nValMCContC_i
   from FIN_Titulos_CContabil a join PlaConta e on a.pCPla = e.pPId and e.iVer = a.fCPla,
        FIN_Titulos           c
   where a.iVer    = a.iVAt
     and a.lExc    = 0
     and a.pTFin   = c.pPId
     and c.iVer    = c.iVAt
     and a.pTFin   = 4654009
     and a.lDeb    = 0
   order by e.sCodigo,e.sDescricao
5b) sQrySubGrid=   select a.pPId          pFIN_Titulos_CContCred_i,
          e.pPId          pCContCred_i,
          a.fCPla         fCContCred_i,
          e.sCodigo       sCodCredPla_i,
          e.sDescricao    sDesCredPla_i,
          a.nValPCContC   nValPCContC_i,
          cast(a.nValPCContC/100*c.nVenc as numeric(15,2)) nValMCContC_i
   from FIN_Titulos_CContabil a join PlaConta e on a.pCPla = e.pPId and e.iVer = a.fCPla,
        FIN_Titulos           c
   where a.iVer    = a.iVAt
     and a.lExc    = 0
     and a.pTFin   = c.pPId
     and c.iVer    = c.iVAt
     and a.pTFin   = 4654009
     and a.lDeb    = 0
   order by e.sCodigo,e.sDescricao
sQrySubGrid=   select a.pPId          pFIN_Titulos_CContCred_i,
          e.pPId          pCContCred_i,
          a.fCPla         fCContCred_i,
          e.sCodigo       sCodCredPla_i,
          e.sDescricao    sDesCredPla_i,
          a.nValPCContC   nValPCContC_i,
          cast(a.nValPCContC/100*c.nVenc as numeric(15,2)) nValMCContC_i
   from FIN_Titulos_CContabil a join PlaConta e on a.pCPla = e.pPId and e.iVer = a.fCPla,
        FIN_Titulos           c
   where a.iVer    = a.iVAt
     and a.lExc    = 0
     and a.pTFin   = c.pPId
     and c.iVer    = c.iVAt
     and a.pTFin   = 4654009
     and a.lDeb    = 0
   order by e.sCodigo,e.sDescricao
psVer=0
iCountTmpX=0
count(aLins)=16
sLin=select a.pPId          pFIN_Titulos_CContCred_i,
sCpo=pPId, sVar=pFIN_Titulos_CContCred_i
sLin=e.pPId          pCContCred_i,
sCpo=pPId, sVar=pCContCred_i
sLin=a.fCPla         fCContCred_i,
sCpo=fCPla, sVar=fCContCred_i
sLin=e.sCodigo       sCodCredPla_i,
sCpo=sCodigo, sVar=sCodCredPla_i
sLin=e.sDescricao    sDesCredPla_i,
sCpo=sDescricao, sVar=sDesCredPla_i
sLin=a.nValPCContC   nValPCContC_i,
sCpo=nValPCContC, sVar=nValPCContC_i
sLin=cast(a.nValPCContC/100*c.nVenc as numeric(15,2)) nValMCContC_i
sCpo=nVenc, sVar=nValMCContC_i
sLin=from FIN_Titulos_CContabil a join PlaConta e on a.pCPla = e.pPId and e.iVer = a.fCPla,
psId=4654009, iAPreencher=10, psTagMnemTDoc=FIN_Titulos, iSubGrid=4
(1)sQrySubGrid=   select a.pPId          pFIN_Titulos_CContCred_i,
          e.pPId          pCContCred_i,
          a.fCPla         fCContCred_i,
          e.sCodigo       sCodCredPla_i,
          e.sDescricao    sDesCredPla_i,
          a.nValPCContC   nValPCContC_i,
          cast(a.nValPCContC/100*c.nVenc as numeric(15,2)) nValMCContC_i
   from FIN_Titulos_CContabil a join PlaConta e on a.pCPla = e.pPId and e.iVer = a.fCPla,
        FIN_Titulos           c
   where a.iVer    = a.iVAt
     and a.lExc    = 0
     and a.pTFin   = c.pPId
     and c.iVer    = c.iVAt
     and a.pTFin   = 4654009
     and a.lDeb    = 0
   order by e.sCodigo,e.sDescricao
aTmp[1]=pFIN_Titulos_CContCred_i
sVar=pFIN_Titulos_CContCred_1
aTmp[0]=pPId, sVar=pFIN_Titulos_CContCred_1, kk=0, aLin[kk]=4020762
aTmp[1]=pCContCred_i
sVar=pCContCred_1
aTmp[0]=pPId, sVar=pCContCred_1, kk=1, aLin[kk]=494
aTmp[1]=fCContCred_i
sVar=fCContCred_1
aTmp[0]=fCPla, sVar=fCContCred_1, kk=2, aLin[kk]=2
aTmp[1]=sCodCredPla_i
sVar=sCodCredPla_1
aTmp[0]=sCodigo, sVar=sCodCredPla_1, kk=3, aLin[kk]=60.01.01            
aTmp[1]=sDesCredPla_i
sVar=sDesCredPla_1
aTmp[0]=sDescricao, sVar=sDesCredPla_1, kk=4, aLin[kk]=DUPLICATAS
aTmp[1]=nValPCContC_i
sVar=nValPCContC_1
aTmp[0]=nValPCContC, sVar=nValPCContC_1, kk=5, aLin[kk]=100.00000
aTmp[1]=nValMCContC_i
sVar=nValMCContC_1
aTmp[0]=nVenc, sVar=nValMCContC_1, kk=6, aLin[kk]=22046.96
iAPreencher=10
sVar=pFIN_Titulos_CContCred_2
sVar=pCContCred_2
sVar=fCContCred_2
sVar=sCodCredPla_2
sVar=sDesCredPla_2
sVar=nValPCContC_2
sVar=nValMCContC_2
sVar=pFIN_Titulos_CContCred_3
sVar=pCContCred_3
sVar=fCContCred_3
sVar=sCodCredPla_3
sVar=sDesCredPla_3
sVar=nValPCContC_3
sVar=nValMCContC_3
sVar=pFIN_Titulos_CContCred_4
sVar=pCContCred_4
sVar=fCContCred_4
sVar=sCodCredPla_4
sVar=sDesCredPla_4
sVar=nValPCContC_4
sVar=nValMCContC_4
sVar=pFIN_Titulos_CContCred_5
sVar=pCContCred_5
sVar=fCContCred_5
sVar=sCodCredPla_5
sVar=sDesCredPla_5
sVar=nValPCContC_5
sVar=nValMCContC_5
sVar=pFIN_Titulos_CContCred_6
sVar=pCContCred_6
sVar=fCContCred_6
sVar=sCodCredPla_6
sVar=sDesCredPla_6
sVar=nValPCContC_6
sVar=nValMCContC_6
sVar=pFIN_Titulos_CContCred_7
sVar=pCContCred_7
sVar=fCContCred_7
sVar=sCodCredPla_7
sVar=sDesCredPla_7
sVar=nValPCContC_7
sVar=nValMCContC_7
sVar=pFIN_Titulos_CContCred_8
sVar=pCContCred_8
sVar=fCContCred_8
sVar=sCodCredPla_8
sVar=sDesCredPla_8
sVar=nValPCContC_8
sVar=nValMCContC_8
sVar=pFIN_Titulos_CContCred_9
sVar=pCContCred_9
sVar=fCContCred_9
sVar=sCodCredPla_9
sVar=sDesCredPla_9
sVar=nValPCContC_9
sVar=nValMCContC_9
sVar=pFIN_Titulos_CContCred_10
sVar=pCContCred_10
sVar=fCContCred_10
sVar=sCodCredPla_10
sVar=sDesCredPla_10
sVar=nValPCContC_10
sVar=nValMCContC_10
sVar=pFIN_Titulos_CContCred_11
sVar=pCContCred_11
sVar=fCContCred_11
sVar=sCodCredPla_11
sVar=sDesCredPla_11
sVar=nValPCContC_11
sVar=nValMCContC_11
iTotLinSubGridPreenchidos_4=1
iLoop=4  ---  iAPreencher=10  --- count = 1
iCountAncestrais=1
1) sQrySubGrid=   select a.pPId         pFIN_Titulos_CContDeb_i,
          e.pPId         pCContDeb_i,
          a.fCPla        fCContDeb_i,
          e.sCodigo      sCodDebPla_i,
          e.sDescricao   sDesDebPla_i,
          a.nValPCContD  nValPCContD_i,
          cast(a.nValPCContD/100*c.nVenc as numeric(15,2)) nValMCContD_i
   from FIN_Titulos_CContabil a join PlaConta e on a.pCPla = e.pPId and e.iVer = a.fCPla,
        FIN_Titulos           c
   where a.iVer    = a.iVAt
     and a.lExc    = 0
     and a.pTFin   = c.pPId
     and c.iVer    = c.iVAt
     and a.pTFin   = {ChaveAtual_0}
     and a.lDeb    = 1
   order by e.sCodigo,e.sDescricao, psDDFChamada=1
2) sQrySubGrid=   select a.pPId         pFIN_Titulos_CContDeb_i,
          e.pPId         pCContDeb_i,
          a.fCPla        fCContDeb_i,
          e.sCodigo      sCodDebPla_i,
          e.sDescricao   sDesDebPla_i,
          a.nValPCContD  nValPCContD_i,
          cast(a.nValPCContD/100*c.nVenc as numeric(15,2)) nValMCContD_i
   from FIN_Titulos_CContabil a join PlaConta e on a.pCPla = e.pPId and e.iVer = a.fCPla,
        FIN_Titulos           c
   where a.iVer    = a.iVAt
     and a.lExc    = 0
     and a.pTFin   = c.pPId
     and c.iVer    = c.iVAt
     and a.pTFin   = 4654009
     and a.lDeb    = 1
   order by e.sCodigo,e.sDescricao
3) sQrySubGrid=   select a.pPId         pFIN_Titulos_CContDeb_i,
          e.pPId         pCContDeb_i,
          a.fCPla        fCContDeb_i,
          e.sCodigo      sCodDebPla_i,
          e.sDescricao   sDesDebPla_i,
          a.nValPCContD  nValPCContD_i,
          cast(a.nValPCContD/100*c.nVenc as numeric(15,2)) nValMCContD_i
   from FIN_Titulos_CContabil a join PlaConta e on a.pCPla = e.pPId and e.iVer = a.fCPla,
        FIN_Titulos           c
   where a.iVer    = a.iVAt
     and a.lExc    = 0
     and a.pTFin   = c.pPId
     and c.iVer    = c.iVAt
     and a.pTFin   = 4654009
     and a.lDeb    = 1
   order by e.sCodigo,e.sDescricao
4) sQrySubGrid=   select a.pPId         pFIN_Titulos_CContDeb_i,
          e.pPId         pCContDeb_i,
          a.fCPla        fCContDeb_i,
          e.sCodigo      sCodDebPla_i,
          e.sDescricao   sDesDebPla_i,
          a.nValPCContD  nValPCContD_i,
          cast(a.nValPCContD/100*c.nVenc as numeric(15,2)) nValMCContD_i
   from FIN_Titulos_CContabil a join PlaConta e on a.pCPla = e.pPId and e.iVer = a.fCPla,
        FIN_Titulos           c
   where a.iVer    = a.iVAt
     and a.lExc    = 0
     and a.pTFin   = c.pPId
     and c.iVer    = c.iVAt
     and a.pTFin   = 4654009
     and a.lDeb    = 1
   order by e.sCodigo,e.sDescricao
3) sQrySubGrid=   select a.pPId         pFIN_Titulos_CContDeb_i,
          e.pPId         pCContDeb_i,
          a.fCPla        fCContDeb_i,
          e.sCodigo      sCodDebPla_i,
          e.sDescricao   sDesDebPla_i,
          a.nValPCContD  nValPCContD_i,
          cast(a.nValPCContD/100*c.nVenc as numeric(15,2)) nValMCContD_i
   from FIN_Titulos_CContabil a join PlaConta e on a.pCPla = e.pPId and e.iVer = a.fCPla,
        FIN_Titulos           c
   where a.iVer    = a.iVAt
     and a.lExc    = 0
     and a.pTFin   = c.pPId
     and c.iVer    = c.iVAt
     and a.pTFin   = 4654009
     and a.lDeb    = 1
   order by e.sCodigo,e.sDescricao
4) sQrySubGrid=   select a.pPId         pFIN_Titulos_CContDeb_i,
          e.pPId         pCContDeb_i,
          a.fCPla        fCContDeb_i,
          e.sCodigo      sCodDebPla_i,
          e.sDescricao   sDesDebPla_i,
          a.nValPCContD  nValPCContD_i,
          cast(a.nValPCContD/100*c.nVenc as numeric(15,2)) nValMCContD_i
   from FIN_Titulos_CContabil a join PlaConta e on a.pCPla = e.pPId and e.iVer = a.fCPla,
        FIN_Titulos           c
   where a.iVer    = a.iVAt
     and a.lExc    = 0
     and a.pTFin   = c.pPId
     and c.iVer    = c.iVAt
     and a.pTFin   = 4654009
     and a.lDeb    = 1
   order by e.sCodigo,e.sDescricao
3) sQrySubGrid=   select a.pPId         pFIN_Titulos_CContDeb_i,
          e.pPId         pCContDeb_i,
          a.fCPla        fCContDeb_i,
          e.sCodigo      sCodDebPla_i,
          e.sDescricao   sDesDebPla_i,
          a.nValPCContD  nValPCContD_i,
          cast(a.nValPCContD/100*c.nVenc as numeric(15,2)) nValMCContD_i
   from FIN_Titulos_CContabil a join PlaConta e on a.pCPla = e.pPId and e.iVer = a.fCPla,
        FIN_Titulos           c
   where a.iVer    = a.iVAt
     and a.lExc    = 0
     and a.pTFin   = c.pPId
     and c.iVer    = c.iVAt
     and a.pTFin   = 4654009
     and a.lDeb    = 1
   order by e.sCodigo,e.sDescricao
4) sQrySubGrid=   select a.pPId         pFIN_Titulos_CContDeb_i,
          e.pPId         pCContDeb_i,
          a.fCPla        fCContDeb_i,
          e.sCodigo      sCodDebPla_i,
          e.sDescricao   sDesDebPla_i,
          a.nValPCContD  nValPCContD_i,
          cast(a.nValPCContD/100*c.nVenc as numeric(15,2)) nValMCContD_i
   from FIN_Titulos_CContabil a join PlaConta e on a.pCPla = e.pPId and e.iVer = a.fCPla,
        FIN_Titulos           c
   where a.iVer    = a.iVAt
     and a.lExc    = 0
     and a.pTFin   = c.pPId
     and c.iVer    = c.iVAt
     and a.pTFin   = 4654009
     and a.lDeb    = 1
   order by e.sCodigo,e.sDescricao
5) sQrySubGrid=   select a.pPId         pFIN_Titulos_CContDeb_i,
          e.pPId         pCContDeb_i,
          a.fCPla        fCContDeb_i,
          e.sCodigo      sCodDebPla_i,
          e.sDescricao   sDesDebPla_i,
          a.nValPCContD  nValPCContD_i,
          cast(a.nValPCContD/100*c.nVenc as numeric(15,2)) nValMCContD_i
   from FIN_Titulos_CContabil a join PlaConta e on a.pCPla = e.pPId and e.iVer = a.fCPla,
        FIN_Titulos           c
   where a.iVer    = a.iVAt
     and a.lExc    = 0
     and a.pTFin   = c.pPId
     and c.iVer    = c.iVAt
     and a.pTFin   = 4654009
     and a.lDeb    = 1
   order by e.sCodigo,e.sDescricao
5a) sQrySubGrid=   select a.pPId         pFIN_Titulos_CContDeb_i,
          e.pPId         pCContDeb_i,
          a.fCPla        fCContDeb_i,
          e.sCodigo      sCodDebPla_i,
          e.sDescricao   sDesDebPla_i,
          a.nValPCContD  nValPCContD_i,
          cast(a.nValPCContD/100*c.nVenc as numeric(15,2)) nValMCContD_i
   from FIN_Titulos_CContabil a join PlaConta e on a.pCPla = e.pPId and e.iVer = a.fCPla,
        FIN_Titulos           c
   where a.iVer    = a.iVAt
     and a.lExc    = 0
     and a.pTFin   = c.pPId
     and c.iVer    = c.iVAt
     and a.pTFin   = 4654009
     and a.lDeb    = 1
   order by e.sCodigo,e.sDescricao
5b) sQrySubGrid=   select a.pPId         pFIN_Titulos_CContDeb_i,
          e.pPId         pCContDeb_i,
          a.fCPla        fCContDeb_i,
          e.sCodigo      sCodDebPla_i,
          e.sDescricao   sDesDebPla_i,
          a.nValPCContD  nValPCContD_i,
          cast(a.nValPCContD/100*c.nVenc as numeric(15,2)) nValMCContD_i
   from FIN_Titulos_CContabil a join PlaConta e on a.pCPla = e.pPId and e.iVer = a.fCPla,
        FIN_Titulos           c
   where a.iVer    = a.iVAt
     and a.lExc    = 0
     and a.pTFin   = c.pPId
     and c.iVer    = c.iVAt
     and a.pTFin   = 4654009
     and a.lDeb    = 1
   order by e.sCodigo,e.sDescricao
sQrySubGrid=   select a.pPId         pFIN_Titulos_CContDeb_i,
          e.pPId         pCContDeb_i,
          a.fCPla        fCContDeb_i,
          e.sCodigo      sCodDebPla_i,
          e.sDescricao   sDesDebPla_i,
          a.nValPCContD  nValPCContD_i,
          cast(a.nValPCContD/100*c.nVenc as numeric(15,2)) nValMCContD_i
   from FIN_Titulos_CContabil a join PlaConta e on a.pCPla = e.pPId and e.iVer = a.fCPla,
        FIN_Titulos           c
   where a.iVer    = a.iVAt
     and a.lExc    = 0
     and a.pTFin   = c.pPId
     and c.iVer    = c.iVAt
     and a.pTFin   = 4654009
     and a.lDeb    = 1
   order by e.sCodigo,e.sDescricao
psVer=0
iCountTmpX=0
count(aLins)=16
sLin=select a.pPId         pFIN_Titulos_CContDeb_i,
sCpo=pPId, sVar=pFIN_Titulos_CContDeb_i
sLin=e.pPId         pCContDeb_i,
sCpo=pPId, sVar=pCContDeb_i
sLin=a.fCPla        fCContDeb_i,
sCpo=fCPla, sVar=fCContDeb_i
sLin=e.sCodigo      sCodDebPla_i,
sCpo=sCodigo, sVar=sCodDebPla_i
sLin=e.sDescricao   sDesDebPla_i,
sCpo=sDescricao, sVar=sDesDebPla_i
sLin=a.nValPCContD  nValPCContD_i,
sCpo=nValPCContD, sVar=nValPCContD_i
sLin=cast(a.nValPCContD/100*c.nVenc as numeric(15,2)) nValMCContD_i
sCpo=nVenc, sVar=nValMCContD_i
sLin=from FIN_Titulos_CContabil a join PlaConta e on a.pCPla = e.pPId and e.iVer = a.fCPla,
psId=4654009, iAPreencher=10, psTagMnemTDoc=FIN_Titulos, iSubGrid=5
(1)sQrySubGrid=   select a.pPId         pFIN_Titulos_CContDeb_i,
          e.pPId         pCContDeb_i,
          a.fCPla        fCContDeb_i,
          e.sCodigo      sCodDebPla_i,
          e.sDescricao   sDesDebPla_i,
          a.nValPCContD  nValPCContD_i,
          cast(a.nValPCContD/100*c.nVenc as numeric(15,2)) nValMCContD_i
   from FIN_Titulos_CContabil a join PlaConta e on a.pCPla = e.pPId and e.iVer = a.fCPla,
        FIN_Titulos           c
   where a.iVer    = a.iVAt
     and a.lExc    = 0
     and a.pTFin   = c.pPId
     and c.iVer    = c.iVAt
     and a.pTFin   = 4654009
     and a.lDeb    = 1
   order by e.sCodigo,e.sDescricao
iAPreencher=10
sVar=pFIN_Titulos_CContDeb_1
sVar=pCContDeb_1
sVar=fCContDeb_1
sVar=sCodDebPla_1
sVar=sDesDebPla_1
sVar=nValPCContD_1
sVar=nValMCContD_1
sVar=pFIN_Titulos_CContDeb_2
sVar=pCContDeb_2
sVar=fCContDeb_2
sVar=sCodDebPla_2
sVar=sDesDebPla_2
sVar=nValPCContD_2
sVar=nValMCContD_2
sVar=pFIN_Titulos_CContDeb_3
sVar=pCContDeb_3
sVar=fCContDeb_3
sVar=sCodDebPla_3
sVar=sDesDebPla_3
sVar=nValPCContD_3
sVar=nValMCContD_3
sVar=pFIN_Titulos_CContDeb_4
sVar=pCContDeb_4
sVar=fCContDeb_4
sVar=sCodDebPla_4
sVar=sDesDebPla_4
sVar=nValPCContD_4
sVar=nValMCContD_4
sVar=pFIN_Titulos_CContDeb_5
sVar=pCContDeb_5
sVar=fCContDeb_5
sVar=sCodDebPla_5
sVar=sDesDebPla_5
sVar=nValPCContD_5
sVar=nValMCContD_5
sVar=pFIN_Titulos_CContDeb_6
sVar=pCContDeb_6
sVar=fCContDeb_6
sVar=sCodDebPla_6
sVar=sDesDebPla_6
sVar=nValPCContD_6
sVar=nValMCContD_6
sVar=pFIN_Titulos_CContDeb_7
sVar=pCContDeb_7
sVar=fCContDeb_7
sVar=sCodDebPla_7
sVar=sDesDebPla_7
sVar=nValPCContD_7
sVar=nValMCContD_7
sVar=pFIN_Titulos_CContDeb_8
sVar=pCContDeb_8
sVar=fCContDeb_8
sVar=sCodDebPla_8
sVar=sDesDebPla_8
sVar=nValPCContD_8
sVar=nValMCContD_8
sVar=pFIN_Titulos_CContDeb_9
sVar=pCContDeb_9
sVar=fCContDeb_9
sVar=sCodDebPla_9
sVar=sDesDebPla_9
sVar=nValPCContD_9
sVar=nValMCContD_9
sVar=pFIN_Titulos_CContDeb_10
sVar=pCContDeb_10
sVar=fCContDeb_10
sVar=sCodDebPla_10
sVar=sDesDebPla_10
sVar=nValPCContD_10
sVar=nValMCContD_10
iTotLinSubGridPreenchidos_5=0
iLoop=5  ---  iAPreencher=10  --- count = 1
iCountAncestrais=1
1) sQrySubGrid= select a.dOco       dOco_i,
        a.sNossoNum  sNossoNum_i,
        a.jCodOco    jCodOco_i,
        (select b.sBanco from CobCNAB b where a.pCobCNAB = b.pPId and b.iVer = b.iVAt) sBanco_i,
        a.pCobCNAB   pCobCNAB_i
  from CobCNAB_Titulos a
 where a.iVer = a.iVAt and a.lExc = 0
   and a.pFin = {ChaveAtual_0}
   and a.dOco is not null
 order by tInc desc, psDDFChamada=1
2) sQrySubGrid= select a.dOco       dOco_i,
        a.sNossoNum  sNossoNum_i,
        a.jCodOco    jCodOco_i,
        (select b.sBanco from CobCNAB b where a.pCobCNAB = b.pPId and b.iVer = b.iVAt) sBanco_i,
        a.pCobCNAB   pCobCNAB_i
  from CobCNAB_Titulos a
 where a.iVer = a.iVAt and a.lExc = 0
   and a.pFin = 4654009
   and a.dOco is not null
 order by tInc desc
3) sQrySubGrid= select a.dOco       dOco_i,
        a.sNossoNum  sNossoNum_i,
        a.jCodOco    jCodOco_i,
        (select b.sBanco from CobCNAB b where a.pCobCNAB = b.pPId and b.iVer = b.iVAt) sBanco_i,
        a.pCobCNAB   pCobCNAB_i
  from CobCNAB_Titulos a
 where a.iVer = a.iVAt and a.lExc = 0
   and a.pFin = 4654009
   and a.dOco is not null
 order by tInc desc
4) sQrySubGrid= select a.dOco       dOco_i,
        a.sNossoNum  sNossoNum_i,
        a.jCodOco    jCodOco_i,
        (select b.sBanco from CobCNAB b where a.pCobCNAB = b.pPId and b.iVer = b.iVAt) sBanco_i,
        a.pCobCNAB   pCobCNAB_i
  from CobCNAB_Titulos a
 where a.iVer = a.iVAt and a.lExc = 0
   and a.pFin = 4654009
   and a.dOco is not null
 order by tInc desc
3) sQrySubGrid= select a.dOco       dOco_i,
        a.sNossoNum  sNossoNum_i,
        a.jCodOco    jCodOco_i,
        (select b.sBanco from CobCNAB b where a.pCobCNAB = b.pPId and b.iVer = b.iVAt) sBanco_i,
        a.pCobCNAB   pCobCNAB_i
  from CobCNAB_Titulos a
 where a.iVer = a.iVAt and a.lExc = 0
   and a.pFin = 4654009
   and a.dOco is not null
 order by tInc desc
4) sQrySubGrid= select a.dOco       dOco_i,
        a.sNossoNum  sNossoNum_i,
        a.jCodOco    jCodOco_i,
        (select b.sBanco from CobCNAB b where a.pCobCNAB = b.pPId and b.iVer = b.iVAt) sBanco_i,
        a.pCobCNAB   pCobCNAB_i
  from CobCNAB_Titulos a
 where a.iVer = a.iVAt and a.lExc = 0
   and a.pFin = 4654009
   and a.dOco is not null
 order by tInc desc
3) sQrySubGrid= select a.dOco       dOco_i,
        a.sNossoNum  sNossoNum_i,
        a.jCodOco    jCodOco_i,
        (select b.sBanco from CobCNAB b where a.pCobCNAB = b.pPId and b.iVer = b.iVAt) sBanco_i,
        a.pCobCNAB   pCobCNAB_i
  from CobCNAB_Titulos a
 where a.iVer = a.iVAt and a.lExc = 0
   and a.pFin = 4654009
   and a.dOco is not null
 order by tInc desc
4) sQrySubGrid= select a.dOco       dOco_i,
        a.sNossoNum  sNossoNum_i,
        a.jCodOco    jCodOco_i,
        (select b.sBanco from CobCNAB b where a.pCobCNAB = b.pPId and b.iVer = b.iVAt) sBanco_i,
        a.pCobCNAB   pCobCNAB_i
  from CobCNAB_Titulos a
 where a.iVer = a.iVAt and a.lExc = 0
   and a.pFin = 4654009
   and a.dOco is not null
 order by tInc desc
5) sQrySubGrid= select a.dOco       dOco_i,
        a.sNossoNum  sNossoNum_i,
        a.jCodOco    jCodOco_i,
        (select b.sBanco from CobCNAB b where a.pCobCNAB = b.pPId and b.iVer = b.iVAt) sBanco_i,
        a.pCobCNAB   pCobCNAB_i
  from CobCNAB_Titulos a
 where a.iVer = a.iVAt and a.lExc = 0
   and a.pFin = 4654009
   and a.dOco is not null
 order by tInc desc
5a) sQrySubGrid= select a.dOco       dOco_i,
        a.sNossoNum  sNossoNum_i,
        a.jCodOco    jCodOco_i,
        (select b.sBanco from CobCNAB b where a.pCobCNAB = b.pPId and b.iVer = b.iVAt) sBanco_i,
        a.pCobCNAB   pCobCNAB_i
  from CobCNAB_Titulos a
 where a.iVer = a.iVAt and a.lExc = 0
   and a.pFin = 4654009
   and a.dOco is not null
 order by tInc desc
5b) sQrySubGrid= select a.dOco       dOco_i,
        a.sNossoNum  sNossoNum_i,
        a.jCodOco    jCodOco_i,
        (select b.sBanco from CobCNAB b where a.pCobCNAB = b.pPId and b.iVer = b.iVAt) sBanco_i,
        a.pCobCNAB   pCobCNAB_i
  from CobCNAB_Titulos a
 where a.iVer = a.iVAt and a.lExc = 0
   and a.pFin = 4654009
   and a.dOco is not null
 order by tInc desc
sQrySubGrid= select a.dOco       dOco_i,
        a.sNossoNum  sNossoNum_i,
        a.jCodOco    jCodOco_i,
        (select b.sBanco from CobCNAB b where a.pCobCNAB = b.pPId and b.iVer = b.iVAt) sBanco_i,
        a.pCobCNAB   pCobCNAB_i
  from CobCNAB_Titulos a
 where a.iVer = a.iVAt and a.lExc = 0
   and a.pFin = 4654009
   and a.dOco is not null
 order by tInc desc
psVer=0
iCountTmpX=0
count(aLins)=10
sLin=select a.dOco       dOco_i,
sCpo=dOco, sVar=dOco_i
sLin=a.sNossoNum  sNossoNum_i,
sCpo=sNossoNum, sVar=sNossoNum_i
sLin=a.jCodOco    jCodOco_i,
sCpo=jCodOco, sVar=jCodOco_i
sLin=(select b.sBanco from CobCNAB b where a.pCobCNAB = b.pPId and b.iVer = b.iVAt) sBanco_i,
sCpo=iVAt), sVar=sBanco_i
sLin=a.pCobCNAB   pCobCNAB_i
sCpo=pCobCNAB, sVar=pCobCNAB_i
sLin=from CobCNAB_Titulos a
psId=4654009, iAPreencher=10, psTagMnemTDoc=FIN_Titulos, iSubGrid=6
(1)sQrySubGrid= select a.dOco       dOco_i,
        a.sNossoNum  sNossoNum_i,
        a.jCodOco    jCodOco_i,
        (select b.sBanco from CobCNAB b where a.pCobCNAB = b.pPId and b.iVer = b.iVAt) sBanco_i,
        a.pCobCNAB   pCobCNAB_i
  from CobCNAB_Titulos a
 where a.iVer = a.iVAt and a.lExc = 0
   and a.pFin = 4654009
   and a.dOco is not null
 order by tInc desc
iAPreencher=10
sVar=dOco_1
sVar=sNossoNum_1
sVar=jCodOco_1
sVar=sBanco_1
sVar=pCobCNAB_1
sVar=dOco_2
sVar=sNossoNum_2
sVar=jCodOco_2
sVar=sBanco_2
sVar=pCobCNAB_2
sVar=dOco_3
sVar=sNossoNum_3
sVar=jCodOco_3
sVar=sBanco_3
sVar=pCobCNAB_3
sVar=dOco_4
sVar=sNossoNum_4
sVar=jCodOco_4
sVar=sBanco_4
sVar=pCobCNAB_4
sVar=dOco_5
sVar=sNossoNum_5
sVar=jCodOco_5
sVar=sBanco_5
sVar=pCobCNAB_5
sVar=dOco_6
sVar=sNossoNum_6
sVar=jCodOco_6
sVar=sBanco_6
sVar=pCobCNAB_6
sVar=dOco_7
sVar=sNossoNum_7
sVar=jCodOco_7
sVar=sBanco_7
sVar=pCobCNAB_7
sVar=dOco_8
sVar=sNossoNum_8
sVar=jCodOco_8
sVar=sBanco_8
sVar=pCobCNAB_8
sVar=dOco_9
sVar=sNossoNum_9
sVar=jCodOco_9
sVar=sBanco_9
sVar=pCobCNAB_9
sVar=dOco_10
sVar=sNossoNum_10
sVar=jCodOco_10
sVar=sBanco_10
sVar=pCobCNAB_10
iTotLinSubGridPreenchidos_6=0
sVars=pFIN_Titulos_CCusto_1=4013310
pCCusto_1=14
fCCusto_1=1
sCCusto_1=Receitas
nValPCCus_1=100.00000
nValMCCus_1=22046.96
pFIN_Titulos_CCusto_2=0
pCCusto_2=0
fCCusto_2=
sCCusto_2=
nValPCCus_2=0.00
nValMCCus_2=0.00
pFIN_Titulos_CCusto_3=0
pCCusto_3=0
fCCusto_3=
sCCusto_3=
nValPCCus_3=0.00
nValMCCus_3=0.00
pFIN_Titulos_CCusto_4=0
pCCusto_4=0
fCCusto_4=
sCCusto_4=
nValPCCus_4=0.00
nValMCCus_4=0.00
pFIN_Titulos_CCusto_5=0
pCCusto_5=0
fCCusto_5=
sCCusto_5=
nValPCCus_5=0.00
nValMCCus_5=0.00
pFIN_Titulos_CCusto_6=0
pCCusto_6=0
fCCusto_6=
sCCusto_6=
nValPCCus_6=0.00
nValMCCus_6=0.00
pFIN_Titulos_CCusto_7=0
pCCusto_7=0
fCCusto_7=
sCCusto_7=
nValPCCus_7=0.00
nValMCCus_7=0.00
pFIN_Titulos_CCusto_8=0
pCCusto_8=0
fCCusto_8=
sCCusto_8=
nValPCCus_8=0.00
nValMCCus_8=0.00
pFIN_Titulos_CCusto_9=0
pCCusto_9=0
fCCusto_9=
sCCusto_9=
nValPCCus_9=0.00
nValMCCus_9=0.00
pFIN_Titulos_CCusto_10=0
pCCusto_10=0
fCCusto_10=
sCCusto_10=
nValPCCus_10=0.00
nValMCCus_10=0.00
pFIN_Titulos_CCusto_11=0
pCCusto_11=0
fCCusto_11=
sCCusto_11=
nValPCCus_11=0.00
nValMCCus_11=0.00
iTotLinSubGridPreenchidos_1=1
iTotLinSubGrid_1=11
pFIN_Titulos_CCorrCred_1=0
pCCorrCred_1=0
fCCorrCred_1=
pAgeCred_1=0
fAgeCred_1=
sCCCred_1=
sDacCred_1=
sAgeCredNr_1=
sAgeCred_1=
pBancoCred_1=0
fBancoCred_1=
sCodCred_1=
sDesCred_1=
nValPCCred_1=0.00
nValMCCred_1=0.00
pFIN_Titulos_CCorrCred_2=0
pCCorrCred_2=0
fCCorrCred_2=
pAgeCred_2=0
fAgeCred_2=
sCCCred_2=
sDacCred_2=
sAgeCredNr_2=
sAgeCred_2=
pBancoCred_2=0
fBancoCred_2=
sCodCred_2=
sDesCred_2=
nValPCCred_2=0.00
nValMCCred_2=0.00
pFIN_Titulos_CCorrCred_3=0
pCCorrCred_3=0
fCCorrCred_3=
pAgeCred_3=0
fAgeCred_3=
sCCCred_3=
sDacCred_3=
sAgeCredNr_3=
sAgeCred_3=
pBancoCred_3=0
fBancoCred_3=
sCodCred_3=
sDesCred_3=
nValPCCred_3=0.00
nValMCCred_3=0.00
pFIN_Titulos_CCorrCred_4=0
pCCorrCred_4=0
fCCorrCred_4=
pAgeCred_4=0
fAgeCred_4=
sCCCred_4=
sDacCred_4=
sAgeCredNr_4=
sAgeCred_4=
pBancoCred_4=0
fBancoCred_4=
sCodCred_4=
sDesCred_4=
nValPCCred_4=0.00
nValMCCred_4=0.00
pFIN_Titulos_CCorrCred_5=0
pCCorrCred_5=0
fCCorrCred_5=
pAgeCred_5=0
fAgeCred_5=
sCCCred_5=
sDacCred_5=
sAgeCredNr_5=
sAgeCred_5=
pBancoCred_5=0
fBancoCred_5=
sCodCred_5=
sDesCred_5=
nValPCCred_5=0.00
nValMCCred_5=0.00
pFIN_Titulos_CCorrCred_6=0
pCCorrCred_6=0
fCCorrCred_6=
pAgeCred_6=0
fAgeCred_6=
sCCCred_6=
sDacCred_6=
sAgeCredNr_6=
sAgeCred_6=
pBancoCred_6=0
fBancoCred_6=
sCodCred_6=
sDesCred_6=
nValPCCred_6=0.00
nValMCCred_6=0.00
pFIN_Titulos_CCorrCred_7=0
pCCorrCred_7=0
fCCorrCred_7=
pAgeCred_7=0
fAgeCred_7=
sCCCred_7=
sDacCred_7=
sAgeCredNr_7=
sAgeCred_7=
pBancoCred_7=0
fBancoCred_7=
sCodCred_7=
sDesCred_7=
nValPCCred_7=0.00
nValMCCred_7=0.00
pFIN_Titulos_CCorrCred_8=0
pCCorrCred_8=0
fCCorrCred_8=
pAgeCred_8=0
fAgeCred_8=
sCCCred_8=
sDacCred_8=
sAgeCredNr_8=
sAgeCred_8=
pBancoCred_8=0
fBancoCred_8=
sCodCred_8=
sDesCred_8=
nValPCCred_8=0.00
nValMCCred_8=0.00
pFIN_Titulos_CCorrCred_9=0
pCCorrCred_9=0
fCCorrCred_9=
pAgeCred_9=0
fAgeCred_9=
sCCCred_9=
sDacCred_9=
sAgeCredNr_9=
sAgeCred_9=
pBancoCred_9=0
fBancoCred_9=
sCodCred_9=
sDesCred_9=
nValPCCred_9=0.00
nValMCCred_9=0.00
pFIN_Titulos_CCorrCred_10=0
pCCorrCred_10=0
fCCorrCred_10=
pAgeCred_10=0
fAgeCred_10=
sCCCred_10=
sDacCred_10=
sAgeCredNr_10=
sAgeCred_10=
pBancoCred_10=0
fBancoCred_10=
sCodCred_10=
sDesCred_10=
nValPCCred_10=0.00
nValMCCred_10=0.00
iTotLinSubGridPreenchidos_2=0
iTotLinSubGrid_2=10
pFIN_Titulos_CCorrDeb_1=0
pCCorrDeb_1=0
fCCorrDeb_1=
pAgeDeb_1=0
fAgeDeb_1=
sCCDeb_1=
sDacDeb_1=
sAgeDebNr_1=
sAgeDeb_1=
pBancoDeb_1=0
fBancoDeb_1=
sCodDeb_1=
sDesDeb_1=
nValPCCDeb_1=0.00
nValMCCDeb_1=0.00
pFIN_Titulos_CCorrDeb_2=0
pCCorrDeb_2=0
fCCorrDeb_2=
pAgeDeb_2=0
fAgeDeb_2=
sCCDeb_2=
sDacDeb_2=
sAgeDebNr_2=
sAgeDeb_2=
pBancoDeb_2=0
fBancoDeb_2=
sCodDeb_2=
sDesDeb_2=
nValPCCDeb_2=0.00
nValMCCDeb_2=0.00
pFIN_Titulos_CCorrDeb_3=0
pCCorrDeb_3=0
fCCorrDeb_3=
pAgeDeb_3=0
fAgeDeb_3=
sCCDeb_3=
sDacDeb_3=
sAgeDebNr_3=
sAgeDeb_3=
pBancoDeb_3=0
fBancoDeb_3=
sCodDeb_3=
sDesDeb_3=
nValPCCDeb_3=0.00
nValMCCDeb_3=0.00
pFIN_Titulos_CCorrDeb_4=0
pCCorrDeb_4=0
fCCorrDeb_4=
pAgeDeb_4=0
fAgeDeb_4=
sCCDeb_4=
sDacDeb_4=
sAgeDebNr_4=
sAgeDeb_4=
pBancoDeb_4=0
fBancoDeb_4=
sCodDeb_4=
sDesDeb_4=
nValPCCDeb_4=0.00
nValMCCDeb_4=0.00
pFIN_Titulos_CCorrDeb_5=0
pCCorrDeb_5=0
fCCorrDeb_5=
pAgeDeb_5=0
fAgeDeb_5=
sCCDeb_5=
sDacDeb_5=
sAgeDebNr_5=
sAgeDeb_5=
pBancoDeb_5=0
fBancoDeb_5=
sCodDeb_5=
sDesDeb_5=
nValPCCDeb_5=0.00
nValMCCDeb_5=0.00
pFIN_Titulos_CCorrDeb_6=0
pCCorrDeb_6=0
fCCorrDeb_6=
pAgeDeb_6=0
fAgeDeb_6=
sCCDeb_6=
sDacDeb_6=
sAgeDebNr_6=
sAgeDeb_6=
pBancoDeb_6=0
fBancoDeb_6=
sCodDeb_6=
sDesDeb_6=
nValPCCDeb_6=0.00
nValMCCDeb_6=0.00
pFIN_Titulos_CCorrDeb_7=0
pCCorrDeb_7=0
fCCorrDeb_7=
pAgeDeb_7=0
fAgeDeb_7=
sCCDeb_7=
sDacDeb_7=
sAgeDebNr_7=
sAgeDeb_7=
pBancoDeb_7=0
fBancoDeb_7=
sCodDeb_7=
sDesDeb_7=
nValPCCDeb_7=0.00
nValMCCDeb_7=0.00
pFIN_Titulos_CCorrDeb_8=0
pCCorrDeb_8=0
fCCorrDeb_8=
pAgeDeb_8=0
fAgeDeb_8=
sCCDeb_8=
sDacDeb_8=
sAgeDebNr_8=
sAgeDeb_8=
pBancoDeb_8=0
fBancoDeb_8=
sCodDeb_8=
sDesDeb_8=
nValPCCDeb_8=0.00
nValMCCDeb_8=0.00
pFIN_Titulos_CCorrDeb_9=0
pCCorrDeb_9=0
fCCorrDeb_9=
pAgeDeb_9=0
fAgeDeb_9=
sCCDeb_9=
sDacDeb_9=
sAgeDebNr_9=
sAgeDeb_9=
pBancoDeb_9=0
fBancoDeb_9=
sCodDeb_9=
sDesDeb_9=
nValPCCDeb_9=0.00
nValMCCDeb_9=0.00
pFIN_Titulos_CCorrDeb_10=0
pCCorrDeb_10=0
fCCorrDeb_10=
pAgeDeb_10=0
fAgeDeb_10=
sCCDeb_10=
sDacDeb_10=
sAgeDebNr_10=
sAgeDeb_10=
pBancoDeb_10=0
fBancoDeb_10=
sCodDeb_10=
sDesDeb_10=
nValPCCDeb_10=0.00
nValMCCDeb_10=0.00
iTotLinSubGridPreenchidos_3=0
iTotLinSubGrid_3=10
pFIN_Titulos_CContCred_1=4020762
pCContCred_1=494
fCContCred_1=2
sCodCredPla_1=60.01.01            
sDesCredPla_1=DUPLICATAS
nValPCContC_1=100.00000
nValMCContC_1=22046.96
pFIN_Titulos_CContCred_2=0
pCContCred_2=0
fCContCred_2=
sCodCredPla_2=
sDesCredPla_2=
nValPCContC_2=0.00
nValMCContC_2=0.00
pFIN_Titulos_CContCred_3=0
pCContCred_3=0
fCContCred_3=
sCodCredPla_3=
sDesCredPla_3=
nValPCContC_3=0.00
nValMCContC_3=0.00
pFIN_Titulos_CContCred_4=0
pCContCred_4=0
fCContCred_4=
sCodCredPla_4=
sDesCredPla_4=
nValPCContC_4=0.00
nValMCContC_4=0.00
pFIN_Titulos_CContCred_5=0
pCContCred_5=0
fCContCred_5=
sCodCredPla_5=
sDesCredPla_5=
nValPCContC_5=0.00
nValMCContC_5=0.00
pFIN_Titulos_CContCred_6=0
pCContCred_6=0
fCContCred_6=
sCodCredPla_6=
sDesCredPla_6=
nValPCContC_6=0.00
nValMCContC_6=0.00
pFIN_Titulos_CContCred_7=0
pCContCred_7=0
fCContCred_7=
sCodCredPla_7=
sDesCredPla_7=
nValPCContC_7=0.00
nValMCContC_7=0.00
pFIN_Titulos_CContCred_8=0
pCContCred_8=0
fCContCred_8=
sCodCredPla_8=
sDesCredPla_8=
nValPCContC_8=0.00
nValMCContC_8=0.00
pFIN_Titulos_CContCred_9=0
pCContCred_9=0
fCContCred_9=
sCodCredPla_9=
sDesCredPla_9=
nValPCContC_9=0.00
nValMCContC_9=0.00
pFIN_Titulos_CContCred_10=0
pCContCred_10=0
fCContCred_10=
sCodCredPla_10=
sDesCredPla_10=
nValPCContC_10=0.00
nValMCContC_10=0.00
pFIN_Titulos_CContCred_11=0
pCContCred_11=0
fCContCred_11=
sCodCredPla_11=
sDesCredPla_11=
nValPCContC_11=0.00
nValMCContC_11=0.00
iTotLinSubGridPreenchidos_4=1
iTotLinSubGrid_4=11
pFIN_Titulos_CContDeb_1=0
pCContDeb_1=0
fCContDeb_1=
sCodDebPla_1=
sDesDebPla_1=
nValPCContD_1=0.00
nValMCContD_1=0.00
pFIN_Titulos_CContDeb_2=0
pCContDeb_2=0
fCContDeb_2=
sCodDebPla_2=
sDesDebPla_2=
nValPCContD_2=0.00
nValMCContD_2=0.00
pFIN_Titulos_CContDeb_3=0
pCContDeb_3=0
fCContDeb_3=
sCodDebPla_3=
sDesDebPla_3=
nValPCContD_3=0.00
nValMCContD_3=0.00
pFIN_Titulos_CContDeb_4=0
pCContDeb_4=0
fCContDeb_4=
sCodDebPla_4=
sDesDebPla_4=
nValPCContD_4=0.00
nValMCContD_4=0.00
pFIN_Titulos_CContDeb_5=0
pCContDeb_5=0
fCContDeb_5=
sCodDebPla_5=
sDesDebPla_5=
nValPCContD_5=0.00
nValMCContD_5=0.00
pFIN_Titulos_CContDeb_6=0
pCContDeb_6=0
fCContDeb_6=
sCodDebPla_6=
sDesDebPla_6=
nValPCContD_6=0.00
nValMCContD_6=0.00
pFIN_Titulos_CContDeb_7=0
pCContDeb_7=0
fCContDeb_7=
sCodDebPla_7=
sDesDebPla_7=
nValPCContD_7=0.00
nValMCContD_7=0.00
pFIN_Titulos_CContDeb_8=0
pCContDeb_8=0
fCContDeb_8=
sCodDebPla_8=
sDesDebPla_8=
nValPCContD_8=0.00
nValMCContD_8=0.00
pFIN_Titulos_CContDeb_9=0
pCContDeb_9=0
fCContDeb_9=
sCodDebPla_9=
sDesDebPla_9=
nValPCContD_9=0.00
nValMCContD_9=0.00
pFIN_Titulos_CContDeb_10=0
pCContDeb_10=0
fCContDeb_10=
sCodDebPla_10=
sDesDebPla_10=
nValPCContD_10=0.00
nValMCContD_10=0.00
iTotLinSubGridPreenchidos_5=0
iTotLinSubGrid_5=10
dOco_1=
sNossoNum_1=
jCodOco_1=0
sBanco_1=0
pCobCNAB_1=0
dOco_2=
sNossoNum_2=
jCodOco_2=0
sBanco_2=0
pCobCNAB_2=0
dOco_3=
sNossoNum_3=
jCodOco_3=0
sBanco_3=0
pCobCNAB_3=0
dOco_4=
sNossoNum_4=
jCodOco_4=0
sBanco_4=0
pCobCNAB_4=0
dOco_5=
sNossoNum_5=
jCodOco_5=0
sBanco_5=0
pCobCNAB_5=0
dOco_6=
sNossoNum_6=
jCodOco_6=0
sBanco_6=0
pCobCNAB_6=0
dOco_7=
sNossoNum_7=
jCodOco_7=0
sBanco_7=0
pCobCNAB_7=0
dOco_8=
sNossoNum_8=
jCodOco_8=0
sBanco_8=0
pCobCNAB_8=0
dOco_9=
sNossoNum_9=
jCodOco_9=0
sBanco_9=0
pCobCNAB_9=0
dOco_10=
sNossoNum_10=
jCodOco_10=0
sBanco_10=0
pCobCNAB_10=0
iTotLinSubGridPreenchidos_6=0
iTotLinSubGrid_6=10
