Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Percent help
Message
 
 
To
13/06/2001 13:33:06
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00518977
Message ID:
00518988
Views:
7
I would add a boolean field to the table called "isPassed".

Then,

SELECT SCORE
REPLACE ALL isPAssed WITH (SCORE1="P" AND SCORE2 = "P" AND SCORE3 = "P")
COUNT TO ln_passed FOR isPassed
ln_total = RECCOUNT()
ln_failed = ln_total - ln_passed


Use the variables in the report;

Ken


>Hi All,
>
>I have one table with the following fields:
>
>SCORE.DBF
>
>ID# SCORE1 SCORE2 SCORE3
>
>11111 F P P
>22222 P P P
>33333 P F P
>44444 F F P
>55555 P P P
>
>F = FAIL
>P = PASS
>
>How to get the report which shows the result like this :
>
>Scan to each record and if F(FAIL) is detected then does not
>count that record at all for the calculation of percentage.
>This means only ID# 22222 and ID# 55555 should be counted
>2 records out of 5 have passed ( all P for score1,score2,score3)
>
>and to have a second REPORT.DBF with two fields :
>
>PASS/FAIL TOTALREC
>
>2 Passes 5
>3 Fails 5
>
>and finally the report :
>
>REPORT.FRM ( SCORE REPORT )
>
>PERCENT PASSED 2/5 = 40%
>PERCENT FAIL 3/5 = 60%
>
>Any kind of source coding would be greatly appreciated ?
>
>Thanks in advance,
>Paul
Ken Wardwell
Previous
Reply
Map
View

Click here to load this message in the networking platform