Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grouping data
Message
From
16/01/2002 21:05:27
 
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Title:
Miscellaneous
Thread ID:
00605813
Message ID:
00605857
Views:
10
>>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.

Hi Sergy & Rob,

Thanks. I didn't think there was a way to do it in the report writer but I had to ask.

Earl
Previous
Reply
Map
View

Click here to load this message in the networking platform