dbTalk Databases Forums  

Calculating sums in layout with 3 databases

comp.databases.filemaker comp.databases.filemaker


Discuss Calculating sums in layout with 3 databases in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
calder@mcn.org
 
Posts: n/a

Default Calculating sums in layout with 3 databases - 08-27-2005 , 11:58 PM






Can't remember how to do this and FM Help isn't helping. Thanks for
you indulgence on this very basic query:
This is database for a business. The layout in question draws from 3
databases (Customers, Jobs, Mileage). The layout shows the customers,
jobs, mileage, wages for a years' time. I want to have a totals of
wages and mileage appear at the bottom of the layout. What sort of
field am I creating, do I create it in the Customer or the Jobs or the
Mileage database and in which part of the layout do I put it?

thanks so much for your help.


Reply With Quote
  #2  
Old   
Helpful Harry
 
Posts: n/a

Default Re: Calculating sums in layout with 3 databases - 08-28-2005 , 12:56 AM






In article <1125205109.327805.210320 (AT) o13g2000cwo (DOT) googlegroups.com>,
calder (AT) mcn (DOT) org wrote:

Quote:
Can't remember how to do this and FM Help isn't helping. Thanks for
you indulgence on this very basic query:
This is database for a business. The layout in question draws from 3
databases (Customers, Jobs, Mileage). The layout shows the customers,
jobs, mileage, wages for a years' time. I want to have a totals of
wages and mileage appear at the bottom of the layout. What sort of
field am I creating, do I create it in the Customer or the Jobs or the
Mileage database and in which part of the layout do I put it?

thanks so much for your help.
That would depend on what you're trying to total (eg. the total of ALL
Mileage, the total of Mileage for each Customer, the total Mileage for
each Job, etc.).

But as a head-start hint, you can use the Sum function via a
relationship link to total all the related records.
eg.
Total Customer Milage {Calculation, Number Result, Unstored}
= Sum (Customer-MileageRelation::Mileage)

This field would be in the Customer file and can be put anywhere you
like on the layout (in the Body part).



Helpful Harry
Hopefully helping harassed humans happily handle handiwork hardships ;o)


Reply With Quote
  #3  
Old   
FP
 
Posts: n/a

Default Re: Calculating sums in layout with 3 databases - 08-30-2005 , 06:17 PM



I'm a little confused, you said you have 3 tables;
Customers, Jobs, and Milage
but the data your showing looks like a flat file (each row is a record
with no related data)

If your data is all in 1 table then you can simply create a "Summary"
field and select "Total of" and then select the Wages field. This
summary field can be placed in the footer and it will calculate in
Browse & Preview mode.

If you do have multiple tables and the data is showing up from related
sources, then what records are being displayed in the layout (you can
see this from Layout Setup -> Show records from).


Reply With Quote
  #4  
Old   
FP
 
Posts: n/a

Default Re: Calculating sums in layout with 3 databases - 09-02-2005 , 03:55 AM



Assuming 1 client can have multiple jobs and 1 job can have multiple
milage's that means you SHOULD be displaying data from the Job table.

To sum up the wages, create the summary field in the Job table. To
view the data in browse mode, place the field in the footer of the
list. For a report, create a "Trailing Grand Summary" and place the
field in it.

The milage that your currently displaying in the report, I assume, is a
calculated field that sums up the milage for all trips for that job.
To sum up that calculated field, again just create a summary field and
place it in the footer or in the Training Grand Summary.

NOTE
If you're not displaying your records from the Jobs table, then this
will NOT work.


Reply With Quote
  #5  
Old   
calder@mcn.org
 
Posts: n/a

Default Re: Calculating sums in layout with 3 databases - 09-11-2005 , 01:25 PM



Harry:
you and FP have been most helpful. it's been a while since I've been
able to get back to this but i have and you've helped me finally solve
this quagmire I couldn't get passed. Every time I do a P&L report for
my business (4 times a year) I have to create a report of all the jobs
I've done in that 3 month period that will generate the total mileage
i've driven to customers' homes and the total mileage I've driven
during that 3 month time period.

what complicates the creation of that report is that I've 3 databases
(customer addresses, jobs and mileage) and I wasn't sure in which
database I should create the report and the fields that would generate
the mileage and wages totals and what part of the layout it would show
up correctly. and that's where you straightened me out: I created the
layout of the report and the summary fields in the JOBS database and
placed the fields in the Trailing Grand Summary and straightened out
the relationships, blah, blah, it WORKS now. thanks so very much for
your patience and time.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.