Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Wrong
Message
De
30/03/2000 19:10:06
Cindy Winegarden
Duke University Medical Center
Durham, Caroline du Nord, États-Unis
 
 
À
30/03/2000 10:14:50
Christopher Pinnock
United General Insurance Company
Kingston, Jamaique
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Titre:
Re: Wrong
Divers
Thread ID:
00352456
Message ID:
00353012
Vues:
18
Chris,

(excuse the false post - I hit tab)

Why SELECT twice from your data? (Doesn't matter whether VFP or SQL database.)

What do you mean that you can't have a qualifier on the parent? Of course you can, unless you are limited by a wizard. Wizards do not allow you to do everything you can do in a prg or through the command window. Consequently, I write my own SQL.

Do something like this:
SELECT Parent.Field1, Parent.Field2, .... Parent.FieldX, ;
    Child.Field1, Child.Field2, .... Child.FieldX ;
    FROM Parent INNER JOIN Child ;
    ON Parent.Pk = Child.Pk ;
    WHERE < some qualifier >
So your data might look like: (Jennifer is my sister)
Parent     ParentAge Child ChildAge
Cindy             46 Joe         19
Cindy             46 Ben         18
Cindy             46 Abi         16
Jennifer          48 Erika        9
Jennifer          48 Jason        5
I assume you want the sum of the values for the parents.
Does that mean you want the sum of the ParentAge, only once for each parent, like 46 + 48 = 94?

Do you ever want the sum of all parent ages (234) or the sum of all child ages (67) ?

Post back with more details of what you want.



>Thanks for your response Cindy.
>
>1. I want a count of the parent table.
>2. I select records from an SQL Server to get my Parent Table
>3. I skip through the parent table and download the children for the record that I'm currently on into a cursor that I created to host all children.
>4. In my report I group by the common key field with no qualifier(eg. cl_claimx).
>5. In the header section of this group I have the fields of the parent table.
>6. In the detail section I have the child Fields.
>7. On the summary bands are my totals. (Hmmm I wonder if the totals shown at the bottom are really correct ??? (All totals are from the parent table.)
>8. The only qualifiers used are the ones on the child table and this is becuase FoxPro wont allow otherwise. (correct me if i'm wrong I've tried it.)
>
>I hope I've explained a little better what I'm talking about. Also This way doesn't offer much room for much grouping and I need to group by other fields in the parent table. I'm really uncertain about how I should approach this problem.
>
>Chris.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform