Information générale
Catégorie:
Gestionnaire de rapports & Rapports
>>I am trying to create an "A/R Statement" Report. In the group header I have the customers name etc and the detail band has the individual invoices and in the group footer I have a field with a variable to sume the invoice amounts. This all works fine. I was wondering if there is any way to get this total of invoices on the group header. I want the portion that the customer sends in with the payment to have the total on it as well.
>>
>>Thanks,
>>
>>Paul
>Paul,
>In fact more than one way to do it. The tendency as I read through thread is using SQL. Well it's a good solution too. Then just run one SQL for sums into a true cursor and relate it to actual parent, child tables for details (to avoid another SQL pass).* Parent table for group header - Linkkey,p1,p2...
>* Child invoice table : Linkkey, s1,s2,...
>* Par-child reltions already set
>select linkkey, ;
> sum(s1) as s1total, ;
> sum(s2) as s2total, ;
> .... ;
> from invoice ;
> group by linkkey ;
> where .t. ;
> into cursor tcTempTotals
>use dbf("tcTempTotals") in 0 again alias tcTotals
>use in "tcTempTotals"
>select tcTotals
>index on linkkey tag linkkey
>select parenttable
>set relation to linkkey into tcTotals
>modify report myreport && Include in first run to easily add your sumfield
>*report form myreport to ....One pass SQL would be so complex for now.
>Cetin
I Agree
Précédent
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