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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

conditional based pass or Failed.. 1

Status
Not open for further replies.

abhi900

IS-IT--Management
Jul 1, 2010
117
0
0
AU
hi,
I have 2 different status for 2 records under 1 group as “ Passed” and “No Run” thus the result should be “Failed” but it shows PASSED.

GROUP :- CRXXX name release Status

Abc1 Release1 Passed
Abc2 Release2 No Run

Thus the overall status should be FAILED (based on the formula I sent below)… but shows “PASSED”.

So Unless the status is not PASSED for all the data then its status should come up as FAILED.
 
Hi,
What formula? Where is it placed?
abhi900 said:
based on the formula I sent below

[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
ooops sorry..

the formula:-

if ({REQ.RQ_REQ_STATUS} in ["Failed","No Run","Not Completed", "N/A"]) then "Failed"

else

"Passed"

The formula is placed on Group Header Section of the Report.

regards

 
since then i have tried to implement the following logic to get the result.
Created 2 formulas:-
1. RStatus -
RStatus –
if ({REQ.RQ_REQ_STATUS} = "N/A") then 1
else
if ({REQ.RQ_REQ_STATUS} = "Failed") then 1
else
if ({REQ.RQ_REQ_STATUS} = "No Run") then 1
else
if ({REQ.RQ_REQ_STATUS} = "Not Completed") then 1 else
0

2. FStatus (placed this formula on Group header)

if sum({@Result_Status}) = 1 then "Failed"
else
"Passed"

However, This partially worked… as it gave me a result of 0 (incorrect as it should be 1) where the status of 2 records under that group was “Passed” and “No Run” rest elsewhere it returned 1 Which was correct.

regards


 
The problem with your first attempt is that you placed a detail level formula in a group header. Try this instead. Create this formula:

if ({REQ.RQ_REQ_STATUS} in ["Failed","No Run","Not Completed", "N/A"]) then
"Failed" else
"Passed"

Place this in the detail section, right click->insert summary->minimum. Then drag the result into the group header. It will only be "Passed" if all records are passed, since "Failed" is earlier alphabetically and would appear if ANY records are failed.

-LB
 
worked like a charm,...!!

everyday you learn something new from crystal. its just never enough.

Thanks soo mch for this mate.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top