Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to count group?
Message
From
05/04/2001 10:35:55
Mark Hall
Independent Developer & Voip Specialist
Keston, Kent, United Kingdom
 
 
To
05/04/2001 10:20:44
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00492332
Message ID:
00492339
Views:
16
>Hi,
> I have a report that contains a data grouping by field cust_id. How to count the number of group/different customer in my report using report designer instead of re-query SQL COUNT() again?
>
>thank you

Hi,

Try this.

Outside your report, define a variable lnVar = 0

Create a UDF which adds 1 to lnVar and returns an empty string

In the group footer of your report, add a firld, which uses the UDF as it's expression. Each time agroup footer is printed, the UDF will be called and 1 will be added to lnVar.
Regards
Mark

Microsoft VFP MCP
Menulib - OO Menus for VFP www.hidb.com/menulib
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform