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

Total is adding in values that have been suppressed

Status
Not open for further replies.

NewB2007

Technical User
Feb 25, 2008
42
US
Working on a AP aging report this is the basic format

Vendor1
X1-bill billdate ageddays balance aged0-30 aged31-60...
X2-bill billdate ageddays balance aged0-30 aged31-60...
X3-bill billdate ageddays balance aged0-30 aged31-60...
billtot
Vendor2
Y1-bill billdate ageddays balance aged0-30 aged31-60...
Y2-bill billdate ageddays balance aged0-30 aged31-60...
Y3-bill billdate ageddays balance aged0-30 aged31-60...
billtot
OVERALL TOT

The report allows the end user to enter in a range that they want to see for instance I want to see all bills aged 35 to 40 days. Then conditionally suppress the days that don't fall into this range. I want to have a total for each vendor and then a total for the set of vendors returned. I have setup the funtions to do the reset if not inrepeatedgroupoheader that has been placed in the vendor header group. I have done the function to do the running total and placed it in the bill grouping. The placed the function in the vendor footer to show the total for each vendor. My problem is that the total for the vendor is adding in the balances for the records that have been suppressed. I only want the values that have been shown.

SUGGESTIONS...
 
Please show the formula you are using for the running total of the vendor.

Please explain how are you evaluate runing total..
if you use a formula please show the formula

 
Here is the check to reset or not.

WHILEPRINTINGRECORDS;
NUMBERVAR v;

if not inrepeatedgroupheader then
v := 0
else
v := v

Here is where the running total is calculated in the bill group.

WHILEPRINTINGRECORDS;
NUMBERVAR v;

v := v + Sum ({Command.TX_AMT}, {Command.BILL_NUMBER})

Here is where I show the total for X vendor

WHILEPRINTINGRECORDS;
NUMBERVAR v;

v := v



 
Sum ({Command.TX_AMT}, {Command.BILL_NUMBER})
This gives the sum of tx_amt for that particular Bill_number with out any restriction.

create a running total #Rtotal0.

In the evaluate -->use a formula --> give the formula if that fall under age 30 or age 31-60...

and then replace
Sum ({Command.TX_AMT}, {Command.BILL_NUMBER})with
#rtotal0
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top