Works great Cathy, thanks, this is the first time I've ever used the "On
exit" option.  Now I can comment out the method code that use to do the
counting prior.

James E Harvey
Hanover Shoe Farms, Inc.
M.I.S./Corresponding Officer
Off: 717-637-8931
fax: 717-637-6766
email: [EMAIL PROTECTED]


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Cathy Pountney
Sent: Tuesday, December 09, 2008 8:22 AM
To: profox@leafe.com
Subject: RE: Counting groups in report designer

> How do you count the number of distinct groups in the report designer?

Create a report variable called rnTattoos, set the value to store to ZERO,
the calculate option to SUM, and the Reset option to End of Report.

In the On Exit Expression of the Data Group Footer band, enter the
following: 
        _VFP.SetVar('rnTattoos', rnTattoos + 1)

Use the rnTattoos variable in your report summary to see the total count.

This works because the report variable creates a placeholder for you to
manipulate. Because you tell the report variable to SUM and what you tell it
to sum is zero, VFP never actually alters the variable. You then manipulate
it in the Data Group Footer by adding 1 with the _VFP.SetVar() function,
thus counting each data group.

Cathy Pountney




[excessive quoting removed by server]

_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to