FUNCTION nbalcli(gl,complet)
local ofont1,ofont2
default complet to .f.
default gl to .f.
if faire
DEFINE FONT oFont1 NAME "andale mono" SIZE 0,-9
DEFINE FONT oFont2 NAME "andale mono" SIZE 0,-9 BOLD
mess := if(gl,"LE GRAND LIVRE","LA BALANCE")
opar := oserver:query("select * from param")
moisref := str(pannee,4)+"-"+strzero(pmois,2)
arrete := ctod("01/"+strzero(pmois,2)+"/"+str(pannee,4))
if complet
laq := "select facture.*,clients.nom as nnom from facture inner join clients on clients.tiers = facture.tiers where facture.tiers between "+c2s(cli1)+" and "+c2s(cli2)+;
" and facture.interne = "+c2s(.F.)+ " and left(datef,7) <= "+c2s(moisref)
lorder := " order by facture.tiers,facture.datef"
else
laq := "select facture.*,clients.nom as nnom from facture inner join clients on clients.tiers = facture.tiers "
laq += "where facture.interne = "+c2s(.F.)+ " and left(datef,7) <= "+c2s(moisref)+" and (reglement+acompte) <> montant"
lorder := " order by nnom,facture.datef"
endif
//tribal := alert("Balance génerale",{"Générale","Par commerciaux"})
//lorder := if( tribal = 2," order by commerciaux,tiers,datef"," order by nom,tiers,datef")
bal := oserver:query(laq+lorder)
memowrit("laq.sql",bal:cquery)
lbtiers:= bal:tiers
REPORT oReport TITLE opar:societe,mess+" CLIENTS","Au "+right(dtoc(arrete),7) LEFT ;
FOOTER ("Page: ")+ltrim(str(oReport:nPage,3)) ;
FONT oFont1, oFont2 PREVIEW
if gl
COLUMN TITLE "Renseignement" DATA dtoc(bal:datef)+" -- "+bal:factno SIZE 50 FONT 1 GRID
COLUMN TITLE "Debit" DATA bal:montant FONT 2 PICTURE "@Z 999 999 999" TOTAL RIGHT GRID
COLUMN TITLE "Crédit" DATA bal:reglement+bal:acompte FONT 2 PICTURE "@Z 999 999 999" TOTAL RIGHT GRID
COLUMN TITLE "Solde" DATA bal:montant-(bal:reglement+bal:acompte) FONT 2 PICTURE "@Z 999 999 999" TOTAL RIGHT GRID
else
COLUMN TITLE "Libellé" DATA pad(" ",45) SIZE 45 FONT 1 GRID
COLUMN TITLE "Debit" DATA bal:montant FONT 2 PICTURE "@Z 999 999 999" TOTAL RIGHT GRID
COLUMN TITLE "Crédit" DATA bal:reglement+bal:acompte FONT 2 PICTURE "@Z 999 999 999" TOTAL RIGHT GRID
COLUMN TITLE "Solde" DATA bal:montant-(bal:reglement+bal:acompte) FONT 2 PICTURE "@Z 999 999 999" TOTAL RIGHT GRID
endif
GROUP ON bal:nnom FOOTER padl(lbtiers,6,'0')+" "+oreport:agroups[1]:cvalue FONT 2
END REPORT
oReport:oTitle:aFont[1] := {|| 2 }
setrsql(bal,oreport)
oreport:lsummary := if(gl,.f.,.t.)
oreport:ljoin := .t.
oreport:lboxontotal := .t.
oreport:odevice:lPrvModal := .t.
oreport:odevice:cdir := chepers
ACTIVATE REPORT oReport ON STARTGROUP (lbtiers:= bal:tiers)
oFont1:End()
oFont2:End()
endif
return nil
function setrsql(osql,oreport)
oreport:bSkip := {|n| osql:skip(n)}
oreport:bwhile := {|| ! osql:Eof() }
oreport:bInit := {|| osql:GOTOP() }
return nil
Please locate the string '=SUBTOTAL(9,'
and substitute it with
'=SOUS.TOTAL(9;'
nageswaragunupudi wrote:Will you please make this correction in report.prg?
Please locate the string '=SUBTOTAL(9,'
and substitute it with
'=SOUS.TOTAL(9;'
We would be glad if you can let us know if this modification works for French installation of Excel.
Excel is installed in Dutch.
So '=SUBTOTAL(9,' was changed into 'SUBTOTAAL(9;'
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 40 guests