Guest_imported
New member
- Jan 1, 1970
- 0
I am wondering why everthing works in this formula except the Combine.Type = "A" portion at the end. I am able to display the "I" and "P" type values but not the "A" type values. When each IF statement is run separately, they work great. But in a nested IF statement, the last one does not work. Help! I am at my wits end!
Here is the code:
if {Combined.Type} <> "P" then
(if {Combined.Type} = "I" and
date(2000,10,01) >= Maximum ({@Tran Date}, {@Service Number})
and date(2000,10,01) <= Maximum ({@paid date}, {@Service Number}) or
(date(2000,10,31) >= Maximum ({@Tran Date}, {@Service Number}) and
date(2000,10,31) <= Maximum ({@paid date}, {@Service Number})) or
(date(2000,10,01) >= Maximum ({@Tran Date}, {@Service Number})
and date(0000,00,00) = Maximum ({@paid date}, {@Service Number}))
then ({@Invoice}))
else (if {Combined.Type} <> "I" then
(if ({Combined.Type} = "P" and
(date(2000,10,01) >= {@paid date}) and (date(2000,10,31) <= {@paid date}))
or (Maximum ({@paid date}, {@Service Number}) >= {@paid date})
then {@Payment}
else
(if ({Combined.Type} = "A" and
(date(2000,10,01) >= {@Adj Date}) and (date(2000,10,31) <= {@Adj Date}))
or (Maximum ({@paid date}, {@Service Number}) >= {@Adj Date})
then {@Adjustments})))
Here is the code:
if {Combined.Type} <> "P" then
(if {Combined.Type} = "I" and
date(2000,10,01) >= Maximum ({@Tran Date}, {@Service Number})
and date(2000,10,01) <= Maximum ({@paid date}, {@Service Number}) or
(date(2000,10,31) >= Maximum ({@Tran Date}, {@Service Number}) and
date(2000,10,31) <= Maximum ({@paid date}, {@Service Number})) or
(date(2000,10,01) >= Maximum ({@Tran Date}, {@Service Number})
and date(0000,00,00) = Maximum ({@paid date}, {@Service Number}))
then ({@Invoice}))
else (if {Combined.Type} <> "I" then
(if ({Combined.Type} = "P" and
(date(2000,10,01) >= {@paid date}) and (date(2000,10,31) <= {@paid date}))
or (Maximum ({@paid date}, {@Service Number}) >= {@paid date})
then {@Payment}
else
(if ({Combined.Type} = "A" and
(date(2000,10,01) >= {@Adj Date}) and (date(2000,10,31) <= {@Adj Date}))
or (Maximum ({@paid date}, {@Service Number}) >= {@Adj Date})
then {@Adjustments})))