Bennie47250
Programmer
Using Crystal 7.0
I’m banging my head on the desk trying to figure this out but not having any luck. Can anyone determine why this is not working? (the formula, not the head banging…..)
This formula is not working
{MYTABLE.ORDERTYPE} like ["EXR", "H*", "L*", "NL*"] and
{ Mytable.Country } = "MEXICO" and
not ({MYTABLE.LINETYPE} in ["C", "T"]) and
if DayOfWeek (CurrentDate) = 2 then {MYTABLE.ENTRYDATE} >= CurrentDate -2 ELSE
{MYTABLE.ENTRYDATE} = CurrentDate
or
{MYTABLE.ORDERTYPE} like ["EXR", "H*", "L*", "NL*"] and
Mytable.Country = "MEXICO" and
not ({MYTABLE.LINETYPE} in ["C", "T"]) AND
if DayOfWeek (CurrentDate) = 2 then {MYTABLE.ENTRYDATE} >= CurrentDate -2 else
{MYTABLE.ENTRYDATE} = CurrentDate
However if I take the day of week checking out it does work
{MYTABLE.ORDERTYPE} like ["EXR", "H*", "L*", "NL*"] and
Mytable.Country = "MEXICO" and
not ({MYTABLE.LINETYPE} in ["C", "T"]) and
{MYTABLE.ENTRYDATE} = CurrentDate
or
{MYTABLE.ORDERTYPE} like ["EXR", "H*", "L*", "NL*"] and
Mytable.Country = "MEXICO" and
not ({MYTABLE.LINETYPE} in ["C", "T"]) AND
{MYTABLE.ENTRYDATE} = CurrentDate
I’m banging my head on the desk trying to figure this out but not having any luck. Can anyone determine why this is not working? (the formula, not the head banging…..)
This formula is not working
{MYTABLE.ORDERTYPE} like ["EXR", "H*", "L*", "NL*"] and
{ Mytable.Country } = "MEXICO" and
not ({MYTABLE.LINETYPE} in ["C", "T"]) and
if DayOfWeek (CurrentDate) = 2 then {MYTABLE.ENTRYDATE} >= CurrentDate -2 ELSE
{MYTABLE.ENTRYDATE} = CurrentDate
or
{MYTABLE.ORDERTYPE} like ["EXR", "H*", "L*", "NL*"] and
Mytable.Country = "MEXICO" and
not ({MYTABLE.LINETYPE} in ["C", "T"]) AND
if DayOfWeek (CurrentDate) = 2 then {MYTABLE.ENTRYDATE} >= CurrentDate -2 else
{MYTABLE.ENTRYDATE} = CurrentDate
However if I take the day of week checking out it does work
{MYTABLE.ORDERTYPE} like ["EXR", "H*", "L*", "NL*"] and
Mytable.Country = "MEXICO" and
not ({MYTABLE.LINETYPE} in ["C", "T"]) and
{MYTABLE.ENTRYDATE} = CurrentDate
or
{MYTABLE.ORDERTYPE} like ["EXR", "H*", "L*", "NL*"] and
Mytable.Country = "MEXICO" and
not ({MYTABLE.LINETYPE} in ["C", "T"]) AND
{MYTABLE.ENTRYDATE} = CurrentDate