Michelle Aycoth
asked on
Crystal Reports - Record selection filter - formula editor
I am actually using I-net report, but they are interchangeable. I-net uses JDBC connections where as Crystal uses ODBC connections.
I'm having an issue with my SQL statement for record selection. The original formula was:
{TABLE.LOB_CODE} in ["Z", "E"] and
date({TABLE.SCAN_TMSTMP}) = currentdate - 1 and
NumericText({TABLE.DOC_TYP E_CODE}) and
not(isnull({TABLE.DOC_TYPE _CODE}))
However, I-net does not know what to do with the function NumericText(). So I attempted to use this:
{TABLE.LOB_CODE} in ["Z", "E"] and
(date({TABLE.SCAN_TMSTMP}) = currentdate - 1) and
(not(isnull({TABLE.DOC_TYP E_CODE}))) and
(If (left({TABLE.DOC_TYPE_CODE },1) = '0')
then ({TABLE.DOC_TYPE_CODE} = Right({TABLE.DOC_TYPE_CODE }, (len({TABLE.DOC_TYPE_CODE} )-1))
else IF(left({TABLE.DOC_TYPE_CO DE}, 2) = '00')
then ({TABLE.DOC_TYPE_CODE} = Right({TABLE.DOC_TYPE_CODE }, (len({TABLE.DOC_TYPE_CODE} )-2)))
My attempt is to eliminate the leading zeros on a numeric field.... which I am guessing the first person did by converting the number to text? At any rate, I continually get a syntax error.... EXPECTED ";" here: line 9 column1. this where the ESLE IF statement begins.
I've tried adding the ";" as suggested, but get another error stating expression expected.
Suggestions? I'm at my rope's end. Thanks, Michelle
I'm having an issue with my SQL statement for record selection. The original formula was:
{TABLE.LOB_CODE} in ["Z", "E"] and
date({TABLE.SCAN_TMSTMP}) = currentdate - 1 and
NumericText({TABLE.DOC_TYP
not(isnull({TABLE.DOC_TYPE
However, I-net does not know what to do with the function NumericText(). So I attempted to use this:
{TABLE.LOB_CODE} in ["Z", "E"] and
(date({TABLE.SCAN_TMSTMP})
(not(isnull({TABLE.DOC_TYP
(If (left({TABLE.DOC_TYPE_CODE
then ({TABLE.DOC_TYPE_CODE} = Right({TABLE.DOC_TYPE_CODE
else IF(left({TABLE.DOC_TYPE_CO
then ({TABLE.DOC_TYPE_CODE} = Right({TABLE.DOC_TYPE_CODE
My attempt is to eliminate the leading zeros on a numeric field.... which I am guessing the first person did by converting the number to text? At any rate, I continually get a syntax error.... EXPECTED ";" here: line 9 column1. this where the ESLE IF statement begins.
I've tried adding the ";" as suggested, but get another error stating expression expected.
Suggestions? I'm at my rope's end. Thanks, Michelle
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER