on 10-28-2010 2:47 PM
Hi,
I written formula like this:
stringVar result;
numberVar pass;
numberVar fail;
if {@result} < 40 then
(result := "Fail";
fail := fail + 1)
else
(result:= "pass";
pass := pass + 1);
result;
Now i want, suppose if i have 'n' no.of peoples, then i have to get the no.of count for each pass and fail.
Eg: Pass 10
fail 5
Can anyone give solution?
Hi,
You're on the right track. What you want to do is called a running total. The only thing you need to add to your formula is:
WhilePrintingRecords;
at the beginning of your formula like:
WhilePrintingRecords;
stringVar result;
numberVar pass;
numberVar fail;
if {@result} < 40 then
(result := "Fail";
fail := fail + 1)
else
(result:= "pass";
pass := pass + 1);
result;
Now create a second formula like:
WhilePrintingRecords;
NumberVar pass;
NumberVar fail;
"Pass = " & ToText (pass, 0, "", "") & "Fail = " & ToText (fail, 0, "", "");
Your first formula should be on the Detail section where you want the variables to accumulate, you can format this formula to suppress if you don't want to see it. The second formula would be where you want to see the final total.
Good luck,
Brian
Edited by: Brian Dong on Oct 28, 2010 4:18 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.