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!

Need to summarize a formula 1

Status
Not open for further replies.

lcutliffe

IS-IT--Management
Dec 1, 2006
30
0
0
US
Hi
i'm trying to summarize a formula to calculate daily overtime for employees. This report is grouped by employee and the total needs to be placed in a group footer summarizing a total for OT per employee.
The formula references a running total so i'm not sure if i will be able to do it.

formula=@dailyOT
runningtotal= ##dailytotal

@dailyOT = if {##dailytotal} < 8.00 then 0 else {##dailytotal} - 8.00

##dailytotal sums up {job_tran.a_hrs}

Ive tried to be as clear as I can, is there any way to do this?
 
It sounds like you don't need a running total to begin with, although it doesn't hurt. If you are now trying so sum {@dailyOT}, use formulas like this:

//{@accum} to be placed in the section containing {@dailyOT}:
whileprintingrecords;
numbervar sumOT := sumOT + {@dailyOT};

Then in the report footer, use a formula like this:

whileprintingrecords;
numbervar sumOT;

If you are trying to summarize within a group, you will need a reset formula in the group header:

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

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top