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!

Help Formula!!!!

Status
Not open for further replies.

jhermiz2

Programmer
Dec 2, 2003
62
US
In my select expert I need to include a lot of conditions...
but its not working..or it works on some and not all...

Here it is:

{TBLLABOR.ACTDATESTART} in {?Start Date} and
if {?FunctionalGroup} = ""
then True
else {TBLEMPLOYEE.DEPARTMENT} = {?FunctionalGroup} and
{TBLWORKORDR.WORKORDERNUMBER} <> "IMEAL" and
(if {?EmpName} = "" then
True
else
{TBLEMPLOYEE.LNAME} = {?EmpName})

It will work for a date, Functionalgroup, or an employee...but it does not perform the part that says:

{TBLLABOR.ACTDATESTART} in {?Start Date} and
{TBLWORKORDR.WORKORDERNUMBER} <> "IMEAL"

BUT if i put it on its own..mainly JUST:

{dbo_TBLLABOR.ACTDATESTART} in {?Start Date} and
{TBLWORKORDR.WORKORDERNUMBER} <> "IMEAL"

That part works...but I need all those conditions!!!!
 
unless i'm being very dumb...
surely you want either:
{TBLLABOR.ACTDATESTART} = {?Start Date}
or:
{TBLLABOR.ACTDATESTART} >= {?Start Date}

i don't know if this will help.
 
Try putting the first IF-THEN clause in a pair of parens, like you did the second IF-THEN.

Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Expert's Guide to Formulas / Tips and Tricks / Guide to Crystal in VB
- tek@kenhamady.com
 
No I dont want = or >= or <=....I want "in" that is not the issue.

I will try ken's recommendation.

Thanks,
Jon
 
If you have a RANGE parameter IN is the same as EQUAL.

Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Expert's Guide to Formulas / Tips and Tricks / Guide to Crystal in VB
- tek@kenhamady.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top