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!

Running Total Failing Within Group 1

Status
Not open for further replies.

jazinc

Technical User
Nov 30, 2005
2
CA
All-

I have a report that consists of three groups.
Group 1- Campus
Group 2- School
Group 3- Programs

The inner most group (Group 3), diplays a number in the footer of group 3 (i.e Field A).

Group 2 Footer, has a running total field B that:
- Summarizes on Field A
- Type of Summary = Sum
- Evaluates on Change of Group 3
- Resets on Change of Group 2

For example, if group 2 lists 5 rows each with a value of 1, then Field B should display a sum of 5.

Presently the data in Field A shows numbers, and sometimes has blanks since the value may not exist in the DB.

Problem is that the Running total field does not equal the sum of the values presented in each of Group 2.

Can anyone help out here?

Thanks,
- jazinc
 
Try the 3 formula method:

Group 2 header:
whileprintingrecords;
numbervar MyTotal:=0;

Group 3 footer formula:
whileprintingrecords;
numbervar MyTotal:=MyTotal+{table.field};

Group 2 footer:
whileprintingrecords;
numbervar MyTotal

Not sure if the group level is correct, your post would be better served by example dtaa and expected output, and of course your software version and database/connectivity might allow for improved performance suggestions, such as a SQL Expression

-k
 
SV's formula should work.

It sounds like you dragged a field into the group #3 footer. This would be the last value in the detail section. When you insert a running total, and use evaluate on change of group, it picks up the first value in the group, not the last. You could either sort your data so that the value you want is in the first detail row (and displayed in the group #3 header), or instead of using evaluate on change of group, use evaluate based on a formula:

onlastrecord or
{table.group#3field} <> next({table.group#3field})

I think either of these would work, but didn't test it.

-LB
 
Thanks very much for the suggestion. Had done this previously quite some time ago.

Cheers,
- jazinc
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top