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

Boolean error

Status
Not open for further replies.

l8kerfan

Technical User
Feb 15, 2006
12
US
I'm using the crystal 8.5 for Prolog Manager 7.5. I have the formula listed below in a report.

I need the formula to recognize or make sure that the {COR Scope Change_4_ttx.ChangeOrderRequests~Status} does not equal "Voided" or "Rejected".

I've tried using an OR statement after "Voided" but I get an error saying a boolean is needed. Any help would be greatly appreciated. Thanks.


If Not IsNull({Change Order Requests.PotentialCO~PCCONumber}) Then
"" Else

If Not IsNull({Change Order Requests.PotentialCO~CORNumber}) And
IsNull({COR Scope Change_4_ttx.ChangeOrderRequests~InitiatedDate}) And
{COR Scope Change_4_ttx.ChangeOrderRequests~Status} <> "Void" Then
"COR's to Submit" Else

If IsNull({Change Order Requests.PotentialCO~CORNumber}) And
{Change Order Requests.PotentialCO~Status} <> "Void" And
{Change Order Requests.PotentialCO~IsClosed} = 1 Then
"Resolved Internal Scope Changes - Total Must Equal $0" Else

If IsNull({Change Order Requests.PotentialCO~CORNumber}) And
{Change Order Requests.PotentialCO~Status} <> "Void" And
{Change Order Requests.PotentialCO~IsClosed} = 0 Then
"Unresolved Internal Scope Changes - Total Must Equal $0" Else

If IsNull({Change Order Requests.PotentialCO~CORNumber}) And
{Change Order Requests.PotentialCO~Status} = "Void" Then
"Voided Internal Scope Changes" Else

If {COR Scope Change_4_ttx.ChangeOrderRequests~Status} = "Void" Then
"Voided COR's" Else


 
Does this formula otherwise work? Change this clause to:

And
not(
{COR Scope Change_4_ttx.ChangeOrderRequests~Status} in ["Void","Rejected"]
) then

-LB
 
If that fails, try breaking up the formula into separate tests. Create some actual boolian, say @No_PCCONumber
Code:
IsNull({Change Order Requests.PotentialCO~PCCONumber})

You could then test for this in another formula, as @No_PCCONumber or not @No_PCCONumber. Build the thing up by stages, and you can have a test line in which boolians are displayed to confirm that they do what they should.

When I was on 8.5, I found it would occasionally reject code that was perfectly good and that worked when it was moved to another formula field. You might try saving the code to a word document and then writing it back to a new Formula field

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Thanks lbass. That worked.

And thanks for the suggestion Madawc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top