View Full Version : Help modifying selection formula


rbursell
12-01-2008, 02:30 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_TRANSACTIO NS.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
12-02-2008, 11:23 AM
Hi

I am attaching the file I need modified. I need it to ignore "current" customers (those with a balance less than 30 days old)

Thanks

http://www.executivecoffee.ca/renee/Account%20Statements-Laser.rpt