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!

summary on a formula

Status
Not open for further replies.

psimon1

Technical User
Mar 18, 2003
55
0
0
US
Hello

I am running CRXI and want to know how to do this. There has to be a way.

I am trying to create a report to determine projected earnings for employees and departments.

I have a formula derived on an employee grouping called Projected Earnings.

I have another grouping for departments. To me, this sounds like a pretty simple sum function.

However, when I attempt Sum ($({@projearnings})), I get an error msg: "field is required here." It must be me; there has to be a way to do this.

In case it helps, this is my formula for projearnings:

(Sum ({CMDEMPLOYEEPRTIME.WAGE-AMOUNT}, {CMDEMPLOYEEPRTIME.EMPLOYEE})*365)/DateDiff ("d",#1/1/2007#, CurrentDate)

Anyone?

Thanks.



 
Use a variable as in the following which should be placed in an employer group section:

whileprintingrecords;
numbervar sumproj := sumproj + {@projearnings};

Then in the report footer use:

whileprintingrecords;
numbervar sumproj;

If {@projearnings} is of currency datatype, change the variable designation in each formula to currencyvar.

-LB

 
Thanks. The grand total works fine but I'm still struggling with the dept totals.
 
Change the first formula to:

whileprintingrecords;
numbervar sumproj := sumproj + {@projearnings};
numbervar deptproj := deptproj + {@projearnings};

Then add a reset formula to the department group header:

whileprintingrecords;
numbervar deptproj;
if not inrepeatedgroupheader then
deptproj := 0;

In the dept group footer, use:
whileprintingrecords;
numbervar deptproj;

I believe this is essentially what was suggested in your other post.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top