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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formula for suppressing rows

Status
Not open for further replies.

jlr123

Technical User
Feb 24, 2014
117
US
If two rows of data has duplicate data with the exception of the {extended amount} but the two rows with extended amount sum to zero.
How do I suppress both rows? I do not want any grouping.
i.e.
row 1 field {customer no}, field [
{item code}, field [invoice no},field {extended amount} = +5.00
row 2 field {customer no}, field [invoice no},field {item code},field {extended amount} = -5.00

Thanks for your assistance.
 
The real question here is why is the row duplicated? The answer is likely due to the way you have your tables linked. Please provide a list of tables and how they are linked.

Macola Software Veteran and SAP Business One Consultant on Training Wheels

Check out our Macola tools:

 
Lines are duplicated where invoice numbers may be the same due to fact that I am retrieving every line item on each invoice. There is no problem with my linking.
 
First create a formula {@all} that includes all fields except the ext amt field, like this (use ampersands so you don't have to convert fields to the same datatype):

//{@all}:
{Table.custno}&{table.item}&{table.invno}

Then use a suppression formula like this on the detail section:

(
not onlastrecord and
{@all}=next({@all} and
{table.extamt}+next({table.extamt})=0
)
Or
(
Not onfirstrecord and
{@all}=previous({@all}) and
{table.extamt}+previous({table.extamt})=0
)

You should also format the detail section to "suppress blank section."

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top