Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Suppresses rows and converting amount to 0 value to avoid Running Total inaccuracy

Status
Not open for further replies.

NBVC

Technical User
Sep 18, 2006
80
CA
I am trying to suppress duplicates.

I have this conditional formula that suppresses the duplicates correctly:

Code:
{PURC_ORDER_LINE.PURC_ORDER_ID}= next({PURC_ORDER_LINE.PURC_ORDER_ID}) and {PURC_ORDER_LINE.LINE_NO}= next({PURC_ORDER_LINE.LINE_NO})

the only problem is that I have a Running Total formula totaling an AMOUNT field and it is totalling also the hidden rows.

how do I suppress duplicates and at the same time convert the AMOUNT field to 0 value so my #RTOT is correct?

I tried using an IF statement like this:

Code:
if {PURC_ORDER_LINE.PURC_ORDER_ID}= next({PURC_ORDER_LINE.PURC_ORDER_ID}) and {PURC_ORDER_LINE.LINE_NO}= next({PURC_ORDER_LINE.LINE_NO}) then {@fla_extended_amt} = 0

but now it neither suppresses nor converts the AMOUNT (@fla_extended_amt) to 0? Note that @fla_extended_amt is a formula result.
 
Ok I think I got it.

I kept the original Suppression code, and revised the Running Total

In the Running Total Field, I used a formula in the Evaluate section:

Code:
NOT({PURC_ORDER_LINE.PURC_ORDER_ID}= next({PURC_ORDER_LINE.PURC_ORDER_ID}) and {PURC_ORDER_LINE.LINE_NO}= next({PURC_ORDER_LINE.LINE_NO}))

Seems to have worked!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top