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 >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.
SELECT COUNT(DISTINCT ReportCursor.ParentPk) ;
>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.