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

summing formula

Status
Not open for further replies.

Ofina

Technical User
Feb 25, 2004
156
US
I have a formula of:
if CurrentDate-{p21_view_aptb_report.net_due_date}>30 and CurrentDate-{p21_view_aptb_report.net_due_date}<=60
then {@amount due}
else 0

This will display the amount due on the invoice if it is between 30 and 60 days overdue.

What I want to do is sum this column at the bottom of my group (by supplier). It won't sum it; I'm guessing because it's conditional.

How can I do this in XI?
 
Actually, nevermind. I took a formula I had from another report and modified it.

I'm good now. Thanks.
 
Okay, not quite. I have it solved if I were doing a grand total (which I will want to as well), but not for sum totals.

I have a formula of:
whileprintingrecords;
currencyvar y := y + {@less equal 30};

which I have placed in the spot where the data is (group header 3 in this case).

Then I have:
whileprintingrecords;
currencyvar y;

which I have placed in a subtotal section (group footer 1 in this case).

It's accumulating down the whole report instead of within each section.
 
Add a reset formula in GH#1:

whileprintingrecords;
currencyvar y;
if not inrepeatedgroupheader then
y := 0;

You need a separate variable for the grand total, but without a reset.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top