×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Suppress a running total resutls once it reaches a value

Suppress a running total resutls once it reaches a value

Suppress a running total resutls once it reaches a value

(OP)
I am working on a report that lists items with the qty hand, then it has a running total of the most recent receipts that I want to stop returning records on the receipt that brings the running total to equal or greater than the qty on hand. Open to any suggestions; sample data;

item qty_on_hand receipt_dt Receipt_qty Total_Received
1001 199 5/25/2018 10 10
1001 199 3/26/2018 1000 1010
1002 191830 2/11/2019 60000 60000
1002 191830 12/26/2018 1055 61055
1002 191830 12/14/2018 100000 161055
1002 191830 5/25/2018 778 161833
1002 191830 4/27/2018 30000 191833
1003 600 9/29/2018 1000 1000

So once the running total reaches the current qty on hand it stops returning receipt records.

Thanks Tek-Tips!

RE: Suppress a running total resutls once it reaches a value

Create a formula for the running total and place it in the detail section:

whileprintingrecords;
numbervar amt;
numbervar prevamt := amt;
if not onfirstrecord and
{table.itemID}<>previous({table.itemID}) then
amt := 0;
amt := amt + {table.receiptqty};

Then go into the section expert->details->suppress(do not check)->x+2 and enter:

whileprintingrecords;
numbervar prevamt;
prevamt > {table.qtyonhand}

-LB

RE: Suppress a running total resutls once it reaches a value

(OP)
lbass to the rescue! Worked like a charm.

Thank you so much.

~up4a

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close