Sum of field in found record set

drjohnchadwick
drjohnchadwick used Ask the Experts™
on
I am using Filemaker Pro 5.5v2 on a Mac with OS 10.2.2.  I have a report that I can generate with no problem at all.  The issue is that there is a field in the report associated with each record in the database called number of students.  The number is drawn from a related file.

I set up a field in the main database called sumofstudents.  This is a calculation field that looks like this under define fields:

Sum(detail::NumberofStudents)

Now, the challenge is getting this to appear on the report.  This field only pulls a number from the first record in the found set instead of all the records in a found set.  So, if I have a found set of 4 records with values of:

28
31
18
15

The only number that will appear in the sumofstudents field is the first number, 28.  I need a sum of ALL the values in the report, which in this example should be 92, not 28.

I have tried using different footer types in the layout, and every trick that I can think of and I still can't get this very basic function to work.

Thanks.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
First, make sure that all the values in your key field in main db are unique.  Once that's done, you'll need to create a Summary field that summarizes sumofstudents.  This is the step that will add student totals across records in your found set.  For printing purposes, or displaying in Preview mode, you may want to add Summary Parts into your layout.

Commented:
I agree with the comment, just would like to add that you should make sure that you are in preview mode (Apple-U, and is there anyone else around who calls that helicopter-U like I do??) when viewing summaries and such on the screen in order to make the whole thing appear properly.

Rogier.
Just to clarify TheSupportGroups comment, you should be using a summary field instead of a calculation.

FileMaker trick:
Calculation fields won't be correct if you simply put them on a report layout under a (sub)summary part. Use the GetSummary calc function!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial