Hi All,
CR8.5 from Oracle8i
I've got 3 parameter fields and the selection formula has to evaluate the value of each field then select accordingly. My selection formula is :
if {?idtype} = "All" and {?id} <> "All" and {?Currency} <> "All" then {ACCOUNT} = {?id} and {CURRENCY_ID} = {?Currency} else
if {?idtype} = "All" and {?id} = "All" and {?Currency} <> "All" then {CURRENCY_ID} = {?Currency} else
if {?idtype} = "All" and {?id} <> "All" and {?Currency} = "All" then {ACCOUNT} = {?id} else
if {?idtype} <> "All" and {?id} = "All" and {?Currency} <> "All" then {ID_TYPE} = {?idtype} and {CURRENCY_ID} = {?Currency} else
if {?idtype} <> "All" and {?id} = "All" and {?Currency} = "All" then {ID_TYPE} = {?idtype} else
if {?idtype} <> "All" and {?id} <> "All" and {?Currency} = "All" then {ID_TYPE} = {?idtype} and {ACCOUNT} = {?id} else
if {?idtype} <> "All" and {?id} <> "All" and {?Currency} <> "All" then {ID_TYPE} = {?idtype} and {ACCOUNT} = {?id} and {CURRENCY_ID} = {?Currency} else
if {?idtype} = "All" and {?id} = "All" and {?Currency} = "All" then {ID_TYPE} = {ID_TYPE} and {ACCOUNT} = {ACCOUNT} and {CURRENCY_ID} = {CURRENCY_ID}
This works, but it's a bit messy. Could anyone help with a better way? (I know the last line looks like it doesn't need to be there, but for some reason it won't work without it). Cheers. Reebo
Scotland (Going mad in the mist!)
CR8.5 from Oracle8i
I've got 3 parameter fields and the selection formula has to evaluate the value of each field then select accordingly. My selection formula is :
if {?idtype} = "All" and {?id} <> "All" and {?Currency} <> "All" then {ACCOUNT} = {?id} and {CURRENCY_ID} = {?Currency} else
if {?idtype} = "All" and {?id} = "All" and {?Currency} <> "All" then {CURRENCY_ID} = {?Currency} else
if {?idtype} = "All" and {?id} <> "All" and {?Currency} = "All" then {ACCOUNT} = {?id} else
if {?idtype} <> "All" and {?id} = "All" and {?Currency} <> "All" then {ID_TYPE} = {?idtype} and {CURRENCY_ID} = {?Currency} else
if {?idtype} <> "All" and {?id} = "All" and {?Currency} = "All" then {ID_TYPE} = {?idtype} else
if {?idtype} <> "All" and {?id} <> "All" and {?Currency} = "All" then {ID_TYPE} = {?idtype} and {ACCOUNT} = {?id} else
if {?idtype} <> "All" and {?id} <> "All" and {?Currency} <> "All" then {ID_TYPE} = {?idtype} and {ACCOUNT} = {?id} and {CURRENCY_ID} = {?Currency} else
if {?idtype} = "All" and {?id} = "All" and {?Currency} = "All" then {ID_TYPE} = {ID_TYPE} and {ACCOUNT} = {ACCOUNT} and {CURRENCY_ID} = {CURRENCY_ID}
This works, but it's a bit messy. Could anyone help with a better way? (I know the last line looks like it doesn't need to be there, but for some reason it won't work without it). Cheers. Reebo
Scotland (Going mad in the mist!)