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!

Sum running total and if then statement with running total Help

Status
Not open for further replies.

jlr123

Technical User
Feb 24, 2014
117
US
Here are my three totals that I need to sum:
{#RTotal1}*.0125
{#RTotal0}*.0125
IF ({AR_Customer.SalespersonNo} = "BSB") AND {#RTotal0}>= 76930 then ({#RTotal0}-76930) *.050 ELSE 0.00

I created a variable to sum but it is not working (it prints "false"). I put it in report footer and my other calculations are in Group Footer #1

whileprintingrecords;
numbervar TotCommSum;
TotCommSum=TotCommSum+{@Svccommamt}+{@salecommamt}+{@bonuscom}

Thanks for your help.
 
Try this:

1. Amend the formula as follows (note, to set a variable value you need to use ":=", not "="):
Code:
whileprintingrecords;
numbervar TotCommSum;
TotCommSum [highlight #FCE94F]:[/highlight]= TotCommSum+{@Svccommamt}+{@salecommamt}+{@bonuscom}

2. Move that formula to GF1 (it can be suppressed in need),
3. To display the total, add the following formula to the RF:
Code:
whileprintingrecords;
numbervar TotCommSum;

Hope this helps. Let me now how it goes.

Cheers
Pete
 
Is there a specific reason why you're using a variable? Is the value needed in another formula? If it's not, then change it to something like this:
Code:
whileprintingrecords;
TotCommSum+{@Svccommamt}+{@salecommamt}+{@bonuscom}

-Dell

DecisionFirst Technologies - Seven-time SAP BusinessObjects Solution Partner of the Year
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top