Information générale
Catégorie:
Codage, syntaxe et commandes
Titre:
Need Help on Reports
I have three tables called bill,billdet,slip
Bill contains invoiceno,billdate,paytype,customer. and
billdet contains invoiceno,stockcode,amount and slip contains invoiceno,stockcode,amount. I have the coding as belows
select billdate,stock.groupac as agroupac,billdet.amount as billamt,;
sum(iif(paytype="C",amount,0.00)) as cash,;
sum(iif(paytype="D",amount,0.00)) as credit,;
sum(iif(paytype="M",amount,0.00)) as card;
order by billdate,groupac group by billdate,groupac into cursor aa
select slipdate,stock.groupac as bgroupac,sum(slip.amount) as slipamt
order by slipdate,groupac group by slipdate,groupac into cursor bb
select iif(isnull(billdate)=.t.,slipdate,billdate) as cdate,;
iif(isnull(agroupac)=.t.,bgroupac,agroupac) as groupac,;
cash,credit,card,slipamt order by cdate,groupac into cursor cc
so therefore, the report come out as belows:
Date: 01/09/1999
Group Cash Credit Card Slip Amount Total
Service 200 500 50 80 830
Car/wash 500 400 54 50 1004
It come out perfectly, But The things is I want to print out the docno
as well like:
Date: 01/09/1999 Invoice : IV23450 -IV54210
Group Cash Credit Card Slip Amount Total
Service 200 500 50 80 830
Car/wash 500 400 54 50 1004
Is that possible to do that? Invoice no in range.
sorry for those who can not understand my english ..
Sorry for my english.
Thank you
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement