Thanks, I was wondering if there was a way to do it inside the report generator, but I guess there isn't.
i wound up just putting a field on the summary line sumcount() which returned blank, and every time it hit it, it added one to the count. In the page page heading I put in suminit() which sets the counter back to zero when a new page header is printed. Thanks for your help. ________________________________ From: Peter Cushing <[email protected]> To: [email protected] Sent: Monday, May 21, 2012 11:10 AM Subject: Re: Counting summary occurances using the Foxpro 2.5 report writer Michael Madigan wrote: > I want to count the number of summary lines in a report. > > I have a report that sums based on acct_id. There may be 3 detail lines of > one, 2 detail lines of another, detail lines of a third. > > > The summary report prints out one line for each, or a total of 3 lines. > > At the end of the report, I want to count the summary lines, not the > individual accounts. > > One way to do this is to call a function in the summary band to keep a > running total. > > Is there another way? > > Create an array Private aAccounts dime aAccounts[1] aAccounts[1] = 0 Then run an SQL statement before you run the report SELECT count(distinct acct_id) FROM mytable into array aAccounts At the bottom of your report put a field in for aAccounts[1] Peter ---------------------------------------------------------------- Rajan Imports has changed - we are now Whispering Smith Ltd. For more information see our website at www.whisperingsmith.com Please update your address book with my new email address: [email protected] . This communication is intended for the person or organisation to whom it is addressed. The contents are confidential and may be protected in law. Unauthorised use, copying or disclosure of any of it may be unlawful. If you have received this message in error, please notify us immediately by telephone or email. www.whisperingsmith.com Whispering Smith Ltd Head Office:61 Great Ducie Street, Manchester M3 1RR. Tel:0161 831 3700 Fax:0161 831 3715 London Office:17-19 Foley Street, London W1W 6DW Tel:0207 299 7960 _______________________________________________ Post Messages to: [email protected] 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. --- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html --- _______________________________________________ Post Messages to: [email protected] 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.

