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

Cannot do a summary on a summary 1

Status
Not open for further replies.

NewB2007

Technical User
Feb 25, 2008
42
US
I have a field that does a summary of employees gross wages. Then in another column I take that employees gross wages times .008 this is to calculate the amount of FUTA taxes that need to be paid. The employee only gets charges for 7000 dollars out of their wages. So I have a simple function

if Sum(gross wages, for each employee) > 7000 then
7000 * .008
else
Sum(gross wages, for each employee) * .008

Now I want to do a summary for each department and then for the company.

So basically the report looks like this.

employee name Sum(gross wages) Total FUTA Tax

Sum for dept. Total for Dept

Sum for company Total for Company

The problem is occurring when I want to do the sum for the FUTA for the dept and for the company. It would be great to do a summary of (Total FUTA Tax) for each employee. But I cannot and I believe it is because in the (Total FUTA tax) for each employee I am already using a "summary" to add the gross wages. So basically is there a work around for doing a summary on a function that uses a summary within it?

Please let me know if my rambling has made any sense!
 
Use variables. Create these formulas:

//{@resetdept} to be placed in the departnent group header:
whileprintingrecords;
numbervar dept;
if not inrepeatedgroupheader then
dept := 0;

//{@accum} to be placed in the employee group section:
whileprintingrecords;
numbervar dept := dept + {@yourFUTAformula};
numbervar co := co + {@yourFUTAformula};

//{@displdept} to be placed in the dept group footer:
whileprintingrecords;
numbervar dept;

//{@displc0} to be placed in the report footer:
whileprintingrecords;
numbervar co;

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top