Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Parent Child reporting query
Message
De
26/09/2013 09:23:23
 
 
À
26/09/2013 09:15:55
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01584190
Message ID:
01584210
Vues:
32
>>>>I am trying to produce a report with a parent-child table involved. The parent table has a budget field and the child table has a series of entries under the budgeted item.
>>>>I want to be able to show the budget sum in the summary band; how do I get the report to take a single budget value? At the moment, whatever I do, I get the budget figure multiplied by the number of child entries. So, if I have a parent record with a budget figure of 5 with 3 supporting child entries, the total budget for the group is 15 when it should be 5.
>>>>
>>>>thanks
>>>>Barry Sutton
>>>
>>>
>>>Don't spend time 'fighting' the report designer
>>>
>>>Prepare a cursor first with the data you need - use the cursor as the datasource for the report
>>>
>>>message#689451
>>
>>Yes, wise advice, I normally do exactly that but felt there should be a neater way than manipulating the cursor - but I am now back to that. At least I understand what is going on!
>>
>>Barry.
>
>If you need totals, create another cursor (select .. from .. into ... group by .....)
>Then join the two cursors - You then have the data + totals in one cursor

Thanks - I will do just that!
Barry
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform