Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

if any are fail then fail 1

Status
Not open for further replies.

Monkey820

Technical User
Dec 11, 2003
62
US
Hi,
I need a formula placed in my group header that says "Pass" or "Fail" when looking at the details. But, I want it to "Pass" if all attributes in the details = "Pass" and "Fail" if any of the attributes in the details = "Fail".
Any help is appreciated.
Thanks,

CWR 11.0.0.1282
 
Is there only one field in the details that has a "Pass" or "Fail" result? Or are there multiple fields that each can return Pass or Fail? Please show some sample data at the detail level.

-LB
 
one field


INSPECTION SAMPLE SEQ PASS/FAIL
visual inspection 1 pass
visual inspection 2 fail

dimensional inspection 1 pass
dimensional inspection 2 pass

 
Insert a group on {table.inspection} and then create a formula:

if minimum({table.pass/fail},{table.inspection}) = "fail" then "Fail" else
"Pass"

Place this in the group header. Note that the case of the pass/fail field check should match what is in the database, "FAIL" if all in caps, "fail" if all lower case", "Fail" if propercase.

-LB
 
I am not able to make it work. I am having a problem with nulls. If it is null it needs to fail. The values are null, 0.00 and 1.00.
 
Well, so is 0 "Fail"?

Then create a formula like this:

//{@passfail}
if isnull({table.pass/fail}) or
{table.pass/fail} = 0 then
"Fail" else
"Pass"

Then use a group header formula like this:

if minimum({@passfail},{table.inspection}) = "Fail" then "Fail" else
"Pass"

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top