Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Unique Count?
Message
De
29/08/1998 14:03:10
 
 
À
01/04/1998 22:37:12
Shihchau Tai
Apic Systems Pte Ltd
Singapore, Singapour
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Titre:
Divers
Thread ID:
00088657
Message ID:
00131280
Vues:
27
>>>>>Is there a way to count the number of unique document number in the report? When I use 'count', it gives me the total number of records for the group instead of total number of unique records in the group.
>>>>>
>>>>>Is there a way out?
>>>>
>>>>Select Distinct docnum From table1
>>>>? _TALLY
>>>
>>>Can it be done in the report writer itself? If not, I have to do SQL to find the distinct number, like what you wrote.
>>
>>Do SQL.
>
>Sorry, just want ot double-confirm.
>
>I have 2 subgroups totals and a summary total. Does it mean that I have to do three SQL to get each of the totals to generate this report? (One SQL to get the first sub-total count of the unique records. One SQL to get the second sub-total (sum of the first sub-totals) and last SQL to get the grand total of the unique count)
>
>That is why I am quite reluctant to use SQL. I am hoping that there is a way to do it using report variables.
>
>Any clue?

Hi -

I ran across your message while searching for an answer to a similar problem. I tried several variations on SELECT count(distinct...); however, because of the complexity of my SQL, couldn't get it to work. What did work, and beautifully, was a GREAT tip I found today from a thread from 13/06/1996 (Thread # 2172, Message #2272). As you will see in this thread, you create a report variable (yes, in the report designer!) which you can use in another field expression in the summary band which allows you to get the number of those unique groups.

HTH

Sylvia
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform