Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do i get a count?
Message
 
To
13/12/2001 15:56:20
Henry Ravichander
RC Management Systems Inc.
Saskatchewan, Canada
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00594075
Message ID:
00594115
Views:
18
When you say that some premium fields are "suppressed" on the report ... how are you suppressing them? Have you used Print When logic to conditionally print them or are they separate records in the table that you are skipping with a filter or something?

I'm not sure I completely understand what you are doing ... but I'm guessing you are using PrintWhen logic to suppress the field and using a report variable to count that field. However, Print When only controls whether an item prints ... it doesn't control whether it participates in calculations. To do that, create another report variable with the following expression:
IIF(< printwhencondition >, 1, 0)
Now you can SUM this variable which will give you the count on just those that were printed.

Cathy


>Hi all:
>
>I am trying to get a count of the number of times a Location Code is printed onthe report. This is what I have done so far:
>
>Report Variables: numbill,docamt,numofservs
>
>
>- numbill counts ID_numbers in a field called IDnumber
>- docamt totals a 7 fee fields
>- numofservs - is supposed to count a field called premium (but is NOT doing it)
>
>Current results:
>- numbill is ok
>- docamt is ok
>- numofservs is counting the IDnumber fields instead of the Premium fields (Note: a max of 7 premium fields can appear on the report. If there is only one premium record, then the other 6 are supressed and do not appear on the report - this is the way I want it, and is doing it)
>
>How do I get the numofservs variable to actually count the number of times a Premium value is printed on the report?
>
>Thanks in advance.
>
>- Ravi
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
Next
Reply
Map
View

Click here to load this message in the networking platform