Crystal Report Subreport
===

I think this is a pretty dumb question, but i can't figure it out.

I have this queries:

    select idCostumer, Name, Address from Costumer

This give me the header of the report, and this one:

    select idCostumer, Description, Sum(Total) as Total from Product group by Description


First query runs:

     idCostumer    Name     Address
         1        Phil       Fake Av. 1234
         2        John       Fake Av. 4321

The second:

     idCostumer    Description    Sum(Total)
       1              PROD01          10
       1              PROD02          20
       2              PROD01          30


When i use generate a report using one costumer it's ok. The problem is with 2 or more costumers in the same report.


What i do?

I create 1 dataset with 2 tables (1 per query) linking them by idCostumer. I create a report using this dataset, the first table (header) works fine, it prints my four test costumers.

Then i add a SubReport.

    rpt.Subreports(0).SetDataSource(subReportes.Tables(1)) 'Tables(1) is 2nd Query

But this print the same info again and again.



My Report:


     Costumer: Phil  Address: Fake Av. 1234

     Order:
                  PROD01          10
                  PROD02          20
                  PROD01          30

                  Total           60

     Costumer: John  Address: Fake Av. 4321

     Order:
                  PROD01          10
                  PROD02          20
                  PROD01          30

                  Total           60



Is there a guide or link where i can learn how to include this subreport so i get (or if there is a another way to accomplish this?)

     Costumer: Phil  Address: Fake Av. 1234

     Order:
                  PROD01          10
                  PROD02          20

                  Total           30    

     Costumer: John  Address: Fake Av. 4321

     Order: 
                  PROD01          10

                  Total           10


I'm using VS 2010 (VB), SQL Server 2008 R2, Crystal Report 2010


Thanks!