Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grouping data
Message
 
 
À
16/01/2002 19:12:57
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Titre:
Divers
Thread ID:
00605813
Message ID:
00605824
Vues:
12
>Hi,
>
>I have a report that for the most part is what I want. I lists each of the groups of people and the group totals. But my question is how can I make it so that the groups are listed in order of the group total?
>
>Thanks,

Hi Earl,

You'll have to run a couple of extra selects to rearange your data because report writer doesn't have sorting capabilites. Let's say you report cursor has three filelds: GroupName, PersonName and Score.
SELECT GroupName As GN, SUM(Score) AS GroupTotal ;
  From crsReport ;
  GROUP BY 1 ;
  INTO CURSOR crsTemp1

SELECT *  ;
  From crsReport, crsTemp1 ;
  Where crsReport.GroupName = crsTemp1.GN ;
  ORDER BY GroupTotal, GroupName  ;
  INTO CURSOR crsNewReport
It's just a sample not tested code but it should help you started.
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform