Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Counting all .T. in my report
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00821318
Message ID:
00821355
Views:
21
Count only counts the number of records processed. It does not evaluate the expression to determine whether or not to count. It also does not depend on any Print When logic to determine whether to include it in the count.

The solution is as Dorin suggested .. use SUM. You can either set the expression of the field to IIF(field1, 1, 0) and then mark it as Sum in the summary .. or you can create a report variable to do the same.

Cathy


>i have a logical field (field1) in mytable. i want to display a summary report for all field1 that are true.
>
>i put a text field in my report.. and put this in the expression box..
>
>field1=.T.
>
>clicked on the "computation" button, then selected "count".
>
>but it's not displaying the correct value..
>
>what's wrong?
Cathy Pountney, Microsoft Visual FoxPro MVP
Memorial Business Systems, Inc. (www.mbs-intl.com)

My Website: (www.frontier2000.com)
My Blog: (www.cathypountney.blogspot.com)
My Book: The Visual FoxPro Report Writer - Pushing it to the Limit and Beyond
Free MSDN Article: What's New in the VFP 9.0 Report Writer
Free MSDN Article: The VFP 9.0 Report Writer In Action
Previous
Reply
Map
View

Click here to load this message in the networking platform