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

Sum on Formula That's Summed? 2

Status
Not open for further replies.

supportsvc

Technical User
Jan 24, 2018
249
0
0
US
I am unable to do a Sum on the following formula

Q1Taxable:
Code:
If Sum ({@Q1}, {@Name}) > {@UILimit} then {@UILimit} else Sum ({@Q1}, {@Name})

Where Q1:
Code:
If {PR_EmployeeTaxHistory.CalendarMonth} IN (["01", "02", "03"]) then {PR_EmployeeTaxHistory.GrossWages} else 0

The Q1Taxable is on the Group's Header (Group is the Employee Name)
Name is (lastname, firstname)

When attempting to create another Formula to Sum(@Q1Taxalbe), I get the following error
"This field cannot be summarized"

Since it's already summarized. How do I or what do I need to do so I can sum the Q1Taxable formulated field?
 
Why don’t you just attach your report. You can remove employee name fields if you want.

-LB
 
Your report footer display formulas should read like this:

whileprintingrecords;
currencyvar Q1Tax; //NOT Q1taxable--since Q1Tax is the name of the variable you have accumulated.

Your Grand total formula in the report footer similarly should rely on the variables as follows and as shown earlier:
Whileprintingrecords;
NumberVar Q1Tax;
NumberVar Q2Tax;
NumberVar Q3Tax;
NumberVar Q4Tax;
Q1Tax+Q2Tax+Q3Tax+Q4Tax

Maybe the variable name is confusing since it is actually not a tax. But you could have named them something else, as long as you reference them consistently in all formulas.

-LB
 
sorry, I am confused

it is Q1Tax

as you can see in the actual report provided, it shows
Code:
//@Eval
Whileprintingrecords;
[highlight #FCE94F]currencyvar Q1Tax;
currencyvar Q2Tax;
currencyvar Q3Tax;
currencyvar Q4Tax;[/highlight]
Q1Tax:= Q1Tax + {@Q1taxable};
Q2Tax:= Q2Tax + {@Q2taxable};
Q3Tax:= Q3Tax + {@Q3taxable};
Q4Tax:= Q4Tax + {@Q3taxable};

and the Report footer now is and is producing a more seeming valid total. $1,028,903.29. THe above still showing $0
Code:
Whileprintingrecords;
CurrencyVar Q1Tax;
CurrencyVar Q2Tax;
CurrencyVar Q3Tax;
CurrencyVar Q4Tax;
Q1Tax+Q2Tax+Q3Tax+Q4Tax

see attached

thank you
 
 https://files.engineering.com/getfile.aspx?folder=be4c2028-e52a-4c0f-a65f-9bb9590ee464&file=PR_QtrlyGovTax-CUSTOM.rpt
That's because you don't have the correct variable names in your report footer totals. Take a look at {@TtlQ1taxable}. You need to update the variable name to say Q1tax instead of Q1taxable. Same with your other report footer green formulas.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top