Hi, I've got a record selection formula that looks like this...
If{?Shop Order}<>'' Then
{?Shop Order}=(trim({mctrxhst_sql.ord_no})) Else
{mctrxhst_sql.ord_no}<>'' and
{?Date}={mctrxhst_sql.trx_dt} and
If {?Work Center}<>'' Then
{?Work Center}={mctrxhst_sql.wc}
else {mctrxhst_sql.wc}<>'' and
If {?Operation Type}="Production" Then
{sfdtlfil_sql.wc_load_cd} <> "S"
Else
{sfdtlfil_sql.wc_load_cd} <> "O" and
{mctrxhst_sql.rec_type} = "O" and
If {?Employee Number}<>0 Then
{?Employee Number}={hzempper_sql.EMP_NO}
else {hzempper_sql.EMP_NO}<>0 and
If {?Work Center}<>'' Then
{?Work Center}={mctrxhst_sql.wc}
else {mctrxhst_sql.wc}<>''
My problem is that if one of the If statements is true it doesn't continue the 'and' statement and finish the formulas, it just stops there but for the report to work it has to complete all the formulas. How can I write this so weither the outcome of the If statement it will finish the whole fomula?
Thank You!
If{?Shop Order}<>'' Then
{?Shop Order}=(trim({mctrxhst_sql.ord_no})) Else
{mctrxhst_sql.ord_no}<>'' and
{?Date}={mctrxhst_sql.trx_dt} and
If {?Work Center}<>'' Then
{?Work Center}={mctrxhst_sql.wc}
else {mctrxhst_sql.wc}<>'' and
If {?Operation Type}="Production" Then
{sfdtlfil_sql.wc_load_cd} <> "S"
Else
{sfdtlfil_sql.wc_load_cd} <> "O" and
{mctrxhst_sql.rec_type} = "O" and
If {?Employee Number}<>0 Then
{?Employee Number}={hzempper_sql.EMP_NO}
else {hzempper_sql.EMP_NO}<>0 and
If {?Work Center}<>'' Then
{?Work Center}={mctrxhst_sql.wc}
else {mctrxhst_sql.wc}<>''
My problem is that if one of the If statements is true it doesn't continue the 'and' statement and finish the formulas, it just stops there but for the report to work it has to complete all the formulas. How can I write this so weither the outcome of the If statement it will finish the whole fomula?
Thank You!