Parenthesis / Or Stmt

Printed From: Crystal Reports Book — Forum Name: Technical Questions

Wrote a report and just cannot for the life of me figure these parens out in order for all of this to work. It is all working 'except' the lines with my ** and I can't figure out what my problem is. Anyone??

(({Members.CGRPID} like {?Health Plan} and
{Members.CPLNTP} like {?LOB}) or
isnull({Members.MBRNO}))

and

{Members.CIPACD} like {?IPA} and
not ({AUTHS.Status} like ["Cancelled","Denied"]) and

**(({AUTHS.ExpirationDate} < {@StartDefaultDate} or
**not isnull({Members.TermDate})) and

({AUTHS.ReferralType} like ["HPC","DIA"] and
isnull ({V_SupplementalDataEndServiceDate.EndServiceDate}))

or

({AUTHS.ReferralType} like ["LTC", "PAL"]) and
isnull ({AUTHS.DischargeDate}))
Well my experience with Crystal Reports says that that NOT is a function and should have it's argument in parenthesis.

...  (({AUTHS.ExpirationDate} < {@StartDefaultDate} or
not( isnull({Members.TermDate}))) and   ...
Good morning; Tried that addition and still not working. Thank you for your suggestion though.
Further examination looks like you are missing a closing parenthesis .  I indented to make it easier to find missing parenthesis.

(
    (
        {Members.CGRPID} like {?Health Plan} and
        {Members.CPLNTP} like {?LOB}
    ) or
        isnull({Members.MBRNO})
)

and

{Members.CIPACD} like {?IPA} and
    not ({AUTHS.Status} like ["Cancelled","Denied"]) and

(
    (
        {AUTHS.ExpirationDate} < {@StartDefaultDate} or
        not(isnull({Members.TermDate}))
    )
    and
   
    ({AUTHS.ReferralType} like ["HPC","DIA"] and
    isnull ({V_SupplementalDataEndServiceDate.EndServiceDate})

    )

or

    (
        {AUTHS.ReferralType} like ["LTC", "PAL"]) and
        isnull ({AUTHS.DischargeDate})
    )
Hi there-yep, I tried exactly what you put in the 2nd response and that line is still not working. It's bringing back records that the expiration date is greater than the StartDefaultDate.

Example: one record has an expiration date of 11/6/2017 and my StartDefaultDate is today 09/08/2017.

and just to verify, those same records do not have any value in the Members.TermDate field?
That is correct. They do not have anything in the term date. Thank you again!
Also with the OR this code would bring 'override' the code above it.

{AUTHS.ReferralType} like ["LTC", "PAL"]) and
        isnull ({AUTHS.DischargeDate})
What Kevlray said :)
[IMG]smileys/smiley4.gif" align="middle" />


Ahhhh....got it. I need to move some things around and add that to the end maybe...will keep thinking about this and work on it.

Edited by BoltzGirl - 08 Sep 2017 at 8:18am