Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do i get a count?
Message
From
15/12/2001 00:24:07
Henry Ravichander
RC Management Systems Inc.
Saskatchewan, Canada
 
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00594075
Message ID:
00594759
Views:
21
Thanks Cathy, I will try this out and keep you posted :)

- Ravi

>Okay ... if I understand you correctly (which I'm not guaranteeing) ... here's what you do:
>
>Create 7 new variables on the report: Code1, Code2, Code3, ... Code7. The expression to use for each value is: IIF(EMPTY(feecodeX), 0, 1) ... where X is 1 thru 7. Set each of them to reset when a new group (Mr. T) occurs.
>
>Now create an 8th variable: TotalCodes. It's expression is Code1+Code2+Code3+Code4+Code5+Code6+Code7. Make sure that this variable is last in the variable list so that the others all process first. Also set this one to reset at a new group.
>
>Now in the Group Footer, add a field object using TotalCodes as the expression and check the SUM option.
>
>For a grand total at the end, I think you can pull this one off by just adding a ninth variable: GrandTotal. Set the expression to: TotalCodes. Mark it as reset at end of report. Mark it as SUM. Then just print GrandTotal in the Summary without setting any special calculations on that particular object.
>
>I hope this all makes sense and helps!
>Cathy
>
>
>>Hi Cathy - thank you so much for your patience!
>>>
>>>I'm still unclear on one thing ... Is each different "service" a different record in the table, or do you have several different service fields in the record? IOW, are you totally the number of records to find the number of services or are you checking several fields and counting how many are not zero?
>>>
>>
>>A single record may have up to 7 services e.g., feecode1, feecode2, feecode3.....feecode7. The report looks like this:
>>
>>Id Number Client Name Service Date Fee Code Premium Code Amount
>>123456 Doe, John 12/12/2001 123A A 248.65
>> 124A 105.00
>> 225G 85.99
>>234567 Mathers, Joe 12/13/2001 425X 1 366.00
>> _____________________________
>> Number of Clients: numbill (counts OK)
>> Number of Services: numofservs (PROBLEM)
>> Total amount for MR.T: docamt (works OK)
>>
>>Note that if there are more than 1 services provided to a client, only the fee code and amount are printed, i.e., the client's name is not printed again. What I now need is to be able to:
>>a. Count the number of services rendered by Mr.T (in this example it would be 4 services - and this is what I hope variable numofservs to provide me) . This should also reset each time a new professional group is encountered, e.g. Miss X.
>>b. Grand out of all services for the office i.e., there may be a Miss.X and a Mr. Y also in the office providing services - therefore a grand total would be nice to have also.
>>
>>Hope I a a bit more clear now. Thanks Cathy.
>>
>>- Ravi
- Ravi

True greatness consists in being great in little things.
- Charles Simmons
Previous
Reply
Map
View

Click here to load this message in the networking platform