Click to See Complete Forum and Search --> : Help modifying selection formula


rbursell
December 1st, 2008, 06:25 PM
Hi

I am trying to modify a statement of account form. It prints current, over 30, over 60, over 90, and a total. It ignores customers with a zero balance.

I need it to also ignore customers that are "current".

So, I tried to add {currentamount} = {grandtotal] in the false section but it said I could not use fields that were going to be evaluated later.

The original forumlas are:

The group selection formula is
if ({?BV99CS06CurrentClosed} = true
and {AR_TRANSACTIONS.OPEN_CLOSE_FLAG} = "C"
and ({@Statement Date} - maximum({AR_TRANSACTIONS2.ARF_DATE},{AR_TRANSACTIONS.FOLIO}) ) >= ToNumber({?BV99SY14AgingOne}))
then false
else true

The record selection formula is
{AR_TRANSACTIONS.ARF_DATE} <= {@Statement Date} and
{TEMP_CUSTOMER.CUS_NO} in {?BV99CS01FromCustomer} to {?BV99CS02ToCustomer} and
(if ({?BV99CS05DetailsInOpen} = false and {?BV99CS06CurrentClosed} = false)
then {AR_TRANSACTIONS.RECNO} = 0
and {AR_TRANSACTIONS.OPEN_CLOSE_FLAG} = "O"
else if ({?BV99CS05DetailsInOpen} = false and {?BV99CS06CurrentClosed} = true)
then {AR_TRANSACTIONS.RECNO} = 0 // for Detials = false and CurrentClosed = true
else if ({?BV99CS05DetailsInOpen} = true and {?BV99CS06CurrentClosed} = false)
then {AR_TRANSACTIONS.RECNO} = 0
and {AR_TRANSACTIONS.OPEN_CLOSE_FLAG} = "O"
else {AR_TRANSACTIONS.RECNO} = 0 and {AR_TRANSACTIONS.OPEN_CLOSE_FLAG} in ["O","C"])

Any suggestions?

Thanks

rbursell
December 2nd, 2008, 03:00 PM
Hi,

I am attaching the report. Maybe, someone could help me. I need the report to ignore customers that are "current". Thanks.

Ned Pepper
December 3rd, 2008, 05:11 PM
if I understand what you are doing, you are trying to eliminate records from customers who's sum of all amounts due is equal to the sum of what is in the customer's current month column. The problem is in order to determine this, you must first read all the records. Having read all the records, it is too late to eliminate any.
one way to solve this is to run a sub-report the will make the determination for you. You insert a copy of you report as a sub-report. The sub-report will have all sections suppressed, so nothing will be dispalyed on your report. the sub-report will simply pass a variable back to the main to indicate whether or not to suppress the customer's data.

Another answer is to build a view which will only return qualifying records